This is the code for the O'Reilly Live Training - Python Data Structures and Comprehensions presented by Arianne Dee
- Python 3.7 or higher installed on your computer
- Installed from the Python website or through Anaconda
- An IDE for Python
- The examples can either be run as Jupyter Notebooks or Python scripts.
- A copy of the course files
- Cloned (ideal) or downloaded
- Jupyter, NumPy and Pandas installed
pip install jupyter numpy pandas
- Fill out a short survey: https://forms.gle/KCSXZy7tHeb1B9ce8
- We will analyze the results during the class.
There are detailed set up instructions for each step below.
If you have further questions, please email arianne.dee.studios at gmail dot com.
If you have been using Python for data science, you probably have it installed already through Anaconda.
If not, or you're not sure, the easiest way to get Python is to download it from the website.
- Go to https://www.python.org/downloads/
- Click the yellow button at the top to download the latest version of Python (e.g. 3.11.1)
- Complete installation
- On Mac or Linux
- Follow the prompts and install using the default settings.
- On Windows
- If you're just installing Python now, follow: Windows Python installer instructions
- If you've already installed Python with the default settings, follow: Add Python to PATH variable in Windows
- On Mac or Linux
The course examples use jupytext to create .ipynb (notebook) and .py (script) files for each of the examples.
The notebook files can be run in:
- Jupyter Lab <-- The instructor will use this in class
- Jupyter Notebook
- Spyder
- PyCharm professional
- VS Code
- Install the official Python extension
- PyCharm community (read-only access) <-- The instructor will use this in class
Any of these options will work for this course.
If all else fails, you can run Jupyter Lab in the browser and upload the course files using JupyterLite.
In addition to viewing the example notebooks, you may want an IDE to help manage your environment.
Go here for instructions on how to use PyCharm community to:
- Set your Python interpreter for your project
- Install required external packages (NumPy and Pandas)
- Install Jupyter
- Run Jupyter Lab from the Terminal
- View the .ipynb files
GitHub repository link: https://github.com/ariannedee/python-data-structures
Clone the repository.
- Click the green "< > Code" button at the top-right of the page
- Click "Download ZIP"
- Unzip it and move the python-data-structures-main folder to a convenient location
Open the top level folder, python-data-structures or python-data-structures-main in your IDE (e.g. PyCharm).
If using PyCharm or VS Code, make sure the desired Python interpreter is set (on the bottom right toolbar).
Jupyter, NumPy and Pandas need to be installed.
In a terminal: pip install jupyter numpy pandas
Instructions:
- Make sure your Python interpreter is set (in the bottom right toolbar).
- On the bottom toolbar, there is an option for Python Packages.
- Search for
jupyter
, click on the one with the exact name, and click Install package - Repeat for
numpy
andpandas
On a Mac:
- Go to PyCharm > Preferences
On a PC:
- Go to File > Settings
Once in Settings:
- Go to Project: intro-to-python > Project Interpreter
- Look for your Python version in the Project Interpreter dropdown and select it. Please use Python 3.6 or higher.
- If you found it, click OK and try running
example_1_first_code
again - Otherwise, if your version wasn't there, click gear icon > Add...
- In the new window, select System Interpreter on the left, and then look for the Python version in the dropdown
- If it's not there, click the ... button and navigate to your Python location
- Note: For this last step, you may have to search the internet for where Python gets installed by default on your operating system
If you are having trouble configuring your Python version, you can find visual instructions here: Python interpreter setup