Series - Plotting and Programming with Python
Welcome to this introductory workshop series on Python for data science. This is a three part series that will walk through basic Python programming with data, working in Jupyter Lab, and doing advanced analyses with tabular datasets. See the schedule or table of contents below to navigate through all the workshop material.
Part 1: Introduction to Basic Programming with Data
In this workshop series, we offer an introduction to Python for non-programmers with a focus on data analysis. In this workshop, we will demonstrate how to do basic Python programming in Jupyter Notebooks. Topics will include working with different data types and using built-in functions and libraries to read and manipulate data.
Part 2: Plotting and Analyzing Tabular Datasets
In the second part of the workshop series, we demonstrate beginner Python programming techniques using the Pandas library to read tabular datasets, perform simple analyses, and visualize data.
Part 3: Analyzing Data with Logic and Iteration
In the final part of the workshop series, we offer an overview of Python fundamentals for performing iterative tasks with for loops and conditional tasks using logic and if statements. We will then show how to apply these programming techniques to analyze and visualize multiple tabular datasets with Pandas.
Presenters
Chasz Griego
STEM Librarian
Office: 4410, Sorrells Library
cgriego@andrew.cmu.edu | Schedule a Consultation
Learning Objectives
Workshop attendees will be able to:
- Run Python programs in JupyterLab
- Create variables that store data
- Identify different data types
- Call built-in Python functions
- Import and use modules from standard Python libraries
- Read a tabular dataset into Python
- Select subsets of data from a DataFrame
- Create plots with data in Python
- Store multiple values in Python with lists
- Make Python programs do iterative tasks
- Write programs that do tasks conditionally
- Process many data sets with a single command
Setup
To be best prepared for this workshop, please follow the setup instructions prior to attending.
Interactive Curriculum
Click the Binder badge below to work through the course content in JupyterLab.
Acknowledgment
The material for this workshop series was created from the Plotting and Programming in Python curriculum developed by The Software Carpentry Foundation of The Carpentries licensed under CC-BY 4.0
Table of contents
- Setup
- Running and Quitting
- Variables and Assignment
- Data Types and Type Conversion
- Built-in Functions and Help
- Libraries
- Reading Tabular Data into DataFrames
- Pandas DataFrames
- Plotting
- Lists
- For Loops
- Conditionals
- Looping over Datasets