| title | [Workshop] Introduction to Python for Data Science | |||||
|---|---|---|---|---|---|---|
| authors |
|
|||||
| author_header | Workshop Developers |
{{ author_row(page) }}
This is a four-day workshop that will introduce students to Python as a data science language. We teach the basics of programming and logic in the context of Python and go on to show the tools that use Python for modern data analysis. This assumes no prior knowledge of Python, but will move at a quick pace to cover all the content. The workshop meets for 3 hours for 4 sessions.
These workshops are Jupyter notebooks, which are documents that contain interactive Python code blocks interleaved with formatted text. You can participate in this workshop by clicking the links below which will open the respective notebooks in Google Colab :octicons-link-external-24:{ target="_blank" }. That's it! The notebook should load and be able to run without any additional setup.
In this bonus notebook, we've collected tips, tricks, and healthy habits for Python and programming in general that we couldn't fit in the main course or that were too heavy on lecture. We will refer to this in class but not spend actual class time on it.
- Troubleshooting Guide
- Code annotation
- More advanced control flow with break and continue
- Exception Handling
- Working with dates and times
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
- What is a computer program?
- Functions and data types
- Operators as functions
- Logical operations
- Metaprogramming skills
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
- Control flow
- If statements
- Loops
- Iterables
- Lists
- Dictionaries
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
- Writing functions
- Functions to programs
- Writing a random walk program
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
- Python refresher
- Reading and writing files
- Introduction to pandas :octicons-link-external-24:{ target="_blank" }
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
- Filtering & modifying pandas dataframes
- Summarizing and grouping dataframes
- Plotting data with Seaborn :octicons-link-external-24:{ target="_blank" }
- Data cleaning exercise
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
In this supplemental notebook, we cover some of the most basic data validation checks you can do with pandas to make sure your data (and your analysis of it) are what you expect. It builds on the file reading and pandas skills from Part 4.
- Checking for header and metadata lines
- File size
- Counting rows before and after filtering
- Counting duplicated rows
- Counting unique IDs
- Counting missing data (NAs)
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }
- Introduction to the Indiana storms dataset
- Exercises to practice the skills learned in the previous days
Open Jupyter notebook :simple-googlecolab:{ target="_blank" .md-button }