Crash Course on Python
Compact one-day course covering data analysis with Numpy and Pandas, visualization with Matplotlib, and statistical tests using real neuroscience data.
Authors
Python is one of the most widely used programming languages in academia and beyond. This one-day, hands-on crash course will teach you how to use Python and manage scientific coding projects. You will learn how to organize and analyze data using the Numpy and Pandas libraries, visualize data using Matplotlib and Seaborn, and perform statistical tests using Pingouin. By analyzing real data from neuroscience and other disciplines, you will gain the confidence needed to apply Python in your own projects.
Credits
Installation
To run the course materials on your own machine, it is recommended that you:
- Install VSCode as your editor
- Install pixi or alternatively conda to create virtual Python environments (see the lessons on environment and package management)
- Create a dedicated folder for this course and install the virtual environment:
Download the pixi.toml file and install the environment:
pixi install --manifest-path pixi.toml
pixi shellDownload the environment.yml file and install the environment:
conda env create -f environment.yml
conda activate intro_python_shortCourse Contents
From Adding Numbers to Analyzing Real Data in Python
Intro to Python and Numpy
Variables, types, summary statistics, arrays, and code speed
Array Programming in Numpy
Working with data in numpy arrays. Accessing data with indices and boolean filtering
Analyzing Tabular Data With Pandas
How to work with datasets in a tabular format using the Pandas ecosystem
Data Visualization with Matplotlib and Seaborn
Imparative plotting with Matplotlib vs. declarative plotting with Seaborn
Statistics with Pingouin
Perform statistical tests including t-tests, ANOVA, and correlations using Pingouin