{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Software installation test\n", "\n", "This Jupyter notebook is for The Open University's _Learn to code for data analysis_ course.\n", "It checks whether your software installation is working as expected.\n", "\n", "To do that, you must open this notebook from within the Jupyter app. Then, in the menu above, click on 'Cell' and then on 'Run all'. This will execute the code below. (The code will be explained in the course.)\n", "\n", "After a while you should see some text stating which version of pandas (the data analysis software we will be using) you have installed, and a graph with two dots plotted on it. \n", "\n", "## Anaconda\n", "\n", "If you're using Anaconda, if the pandas version displayed is 0.20 or higher and you don't get any error messages, then all's well and you can close this notebook (menu 'File', option 'Close and Halt') and then delete the notebook from your disk if you wish.\n", "\n", "If there is an error message saying you don't have Python 3, or if the pandas version displayed is below 0.20, then one of the following has probably happened: \n", "\n", "- you installed the wrong version of Anaconda;\n", "- you installed the wrong variant of Anaconda (there are two variants, for Python 2 and Python 3, of the same version of Anaconda); \n", "- during the installation you decided to keep your existing Python installation. \n", "\n", "To see which software versions you have installed, click on the 'Help' menu above, and then on the 'About' option. You should have the notebook server version 5.0 or higher, Python version 3.5 or higher, and IPython version 6.1 or higher. \n", "\n", "## CoCalc\n", "\n", "If you're using CoCalc and if there are no error messages, then all's well and you can close this notebook (click x on the tab at the top) and delete it from your project if you wish. \n", "\n", "If you get an error that you don't have Python 3, then click on the 'Kernel' menu above, select the 'Change kernel' option, and finally select one of the 'Python 3' options in the menu. You will see some messages on the top right side whilst the kernel (the software that runs the notebook) is being changed. Once the messages disappear, you can click again on 'Run all' in the 'Cell' menu." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import warnings\n", "warnings.simplefilter('ignore', FutureWarning)\n", "\n", "from pandas import *\n", "print('Your pandas version is', pandas.__version__)\n", "\n", "if 1 / 2 == 0:\n", " print('Error: you are not running Python 3')\n", " \n", "df = DataFrame(data=[[1,2], [2,1]], columns=['x','y'])\n", "\n", "%matplotlib inline\n", "df.plot('x', 'y', kind='scatter')\n", "\n", "from scipy.stats import spearmanr" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.2" } }, "nbformat": 4, "nbformat_minor": 1 }