/workshop-python-2021

Workshop: Introduction to Python Programming

Primary LanguageJupyter NotebookMIT LicenseMIT

Python Workshop, June 2021

Intro

Welcome to 'Introduction to Python Programming and Best Practices'! The goal of this workshop is to increase data fluency of the Brown community. In the first two weeks, we learn Python basics such as variables, container types (e.g., lists and dictionaries), control flow (if statements and for loops), and functions. The third week covers a variety of smaller topics related to the standard Python library, other data formats (like JSON), and how to interact with the operating system via Python. Finally, we will learn how to work with and visualize tabular data (excel, csv, SQL data) using packages like pandas and matplotlib during the last week.

Tools

We provide an yaml file which you can use with conda to recreate the python environemt of the workshop. Please install conda from here, and type the following commands into your terminal at the same folder where the workshop material is located:

conda env create -n workshop_env -f workshop-python-2021/workshop.yml

conda activate workshop_env

Alternatively, you can also use the jupyter hub to run the materials. Click on http://ccv.jupyter.brown.edu/ and log in with your Brown ID. Once the jupyter-lab starts (it could take a couple of minutes), click on the 'Git Clone' button on the left side and copy the URL of this repo in there. Once the cloning is completed, you should see the week 1-4 folders and the ipython notebooks.

Links to materials

The table below contains links to the lecture recordings.

lecture
week 1 - day 1 - Introduction watch video here
week 1 - day 2 - Variables watch video here
week 1 - day 3 - Lists watch video here
week 1 - day 4 - Dictionaries watch video here
week 1 - day 5 - If statements watch video here
week 2 - day 1 - For loops watch video here
week 2 - day 2 - Combined for loops and if statements watch video here
week 2 - day 3 - Functions watch video here
week 2 - day 4 - Code testing watch video here
week 3 - day 1 - Collections and itertools watch video here
week 3 - day 2 - Itertools, input/output, reading and writing files watch video here
week 3 - day 3 - System interactions watch video here
week 3 - day 4 - Pattern matching, working with datetime variables, and archiving/pickling watch video here
week 4 - day 1 - Pandas watch video here
week 4 - day 2 - Pandas watch video here
week 4 - day 3 - Visualizations watch video here
week 4 - day 4 - Visualizations watch video here

Contact

The instructors are Matt Slivinski (matthew_slivinski@brown.edu) and Andras Zsom (andras_zsom@brown.edu).

Acknowledgements

We thank the Data Science Initiative at Brown University for sponsoring the workshop.