Skip to Content
View all events

Python Programming for Data Analysis in 3 Weeks—with Interactivity

Published by O'Reilly Media, Inc.

Beginner to intermediate content levelBeginner to intermediate

Make sense of the world, using Python and Pandas

This live event utilizes interactive environments

Course Outcomes:

  • Achieve Proficiency in Data Analysis
  • Turn Data Into Insights
  • Work Smarter with DataFrames
  • Learn Through Doing
  • Visualize Your Findings Effectively
  • Simplify Data Science Concepts
  • Clean and Organize Real-World Data
  • Level-Up Your Career Skills
  • Flexible Learning for All Experience Levels

Whether you’re an app developer, an online store owner, or an epidemiologist, making sense of the data you’ve collected is an increasingly crucial part of your job. It’s no surprise, then, that so many people want to learn data science, an umbrella term that includes analytics (i.e., looking at data to understand what has already happened) and machine learning (i.e., predicting the future based on previously detected patterns). The problem is that many assume these domains require a firm grasp of both programming and statistics, with some additional math skills thrown in, when in reality you can accomplish quite a lot with middle-school math and a basic knowledge of Python programming.

Join expert Reuven M. Lerner to get the basics you need to analyze data using the Python language and the pandas library. You’ll learn how to use pandas to understand the world, comparing human intuition with real-life datasets. You’ll learn how to read data into pandas, clean it up, analyze it, and produce visual outputs that’ll help you present your findings to others. The series will include numerous exercises and explanations that’ll help you grasp this new field and understand how to apply it in your own work.

NOTE: With today’s registration, you’ll be signed up for all three sessions. Although you can attend any of the sessions individually, we recommend participating in all three weeks.

What you’ll learn and how you can apply it

By the end of this live, hands-on, three part series you’ll understand:

Week 1: Getting Started with Data Analysis

  • In the first session you’ll learn about descriptive statistics and aggregate methods, setting and retrieving values, broadcasting operations, mask arrays, indexes, and more.

Week 2: DataFrames

  • This week, you’ll explore data types and DataFrames, including adding and removing data, querying with boolean indexes, reading CSV data, and more.

Week 3: Analyzing our data

  • In the final session you’ll learn about sorting, grouping, advanced grouping, joining, creating pivot tables, and cleaning data, as well as covering basic plotting techniques.

This live event is for you because...

  • You’re a Python developer who wants to get into data analytics.
  • You work with data in Excel, but want to see how Python does things.
  • You want to become a data analyst or data scientist, and need some foundational knowledge in the area.

Prerequisites

  • A computer with Python (preferably 3.10) installed; and NumPy, pandas, Matplotlib, and Jupyter “pip installed” (see instruction video for Jupyter installation)
  • Download the zip file containing CSV files
  • Basic Python knowledge

Recommended preparation:

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Week 1: Getting Started with Data Analysis (4 hours)

  • Introduction to data analytics with Pandas (30 minutes)
  • Course introduction and pla
  • Data analytics + machine learning = data science
  • Why Python is a good choice … and a bad choice
  • NumPy and Pandas
  • Loading Pandas
  • Creating a Pandas series
  • Q&A
  • Exercise: Create a series, do vectorized operations

Useful methods (25 minutes)

  • What are aggregation methods?
  • Five-number summary
  • Mean and standard deviation
  • sum and count
  • Understanding our data with describe, head, tail, and value_counts
  • Q&A
  • Exercise: Calculate stats for your local weather forecast

Break (5 minutes)

Setting and retrieving values (30 minutes)

  • Using (and not using) []
  • Using .loc to retrieve and set
  • Fancy indexing
  • Slices
  • Getting a single value vs. a series
  • Q&A
  • Exercise: Retrieve items from local weather

Broadcasting (30 minutes)

  • Vectorized operations with two series
  • Broadcasting: When a vector meets a scalar
  • What is broadcasting?
  • Simple operations
  • Generating random numbers
  • Broadcasting and random numbers
  • Q&A
  • Exercise: Convert Fahrenheit to Celsius (and back)

Break (5 minutes)

Mask arrays (25 minutes)

  • Broadcasting comparisons
  • Selective retrieval with boolean (“mask”) indexes
  • Selective retrieval by broadcasting comparisons
  • Reading mask indexes
  • Q&A
  • Exercise: Find numbers bigger than the mean

Indexes (30 minutes)

  • Custom indexes
  • Retrieving using indexes
  • .loc vs. .iloc
  • Non-unique indexes
  • Changing/updating the index
  • Exercise: Select particular family members
  • Q&A

Break (5 minutes)

Dtypes (20 min)

  • What are dtypes? Why do we care?
  • Integers and floats
  • Setting the dtype at creation time
  • Changing the dtype with astype
  • Textual data
  • Q&A
  • Exercise: Get the mean, based on strings

NaN (25 minutes)

  • What’s NaN (“Not a Number”)?
  • Descriptive statistics and NaN
  • Dropna
  • Fillna with values
  • fillna with method output
  • Q&A
  • Exercise: Calculate descriptive statistics, despite missing data

Week 2: Data frames (4 hours)

Data frames (30 minutes)

  • Creating a data frame with a list of lists
  • Index vs. columns
  • Retrieving rows with loc and iloc
  • Retrieving columns with []
  • Retrieving multiple columns
  • Naming index and columns
  • Q&A
  • Exercise: Create a grocery store, and retrieve stats from it

Adding and removing data (25 minutes)

  • Adding rows
  • Adding columns
  • Column-adding strategies
  • Deleting rows with drop
  • Deleting columns with drop
  • Q&A
  • Exercise: Add (and remove) family members from a data frame

Break (5 minutes)

Useful methods and attributes (30 minutes)

  • dropna, fillna
  • head, tail
  • Shape
  • Count
  • describe
  • dtypes
  • Q&A
  • Exercise: Calculate high and low temperatures

Querying with boolean indexes (25 minutes)

  • Refresher on boolean indexes
  • Retrieving specific rows using a boolean index
  • Q&A
  • Exercise: Find hot vs. cold days

Break (5 minutes)

Querying with “loc” (30 minutes)

  • Row specifiers
  • Column specifiers
  • Mixing and matching
  • Exercise: Retrieve specific attributes from family members

Reading CSV data (30 minutes)

  • What is CSV?
  • Read_csv
  • Selecting columns
  • Q&A
  • Exercise: Import specific columns from the taxi data CSV files

Break (5 minutes)

More on CSV (20 min)

  • Selecting columns
  • Choosing an index
  • Header lines
  • Q&A
  • Exercise: Find airlines whose names contain particular letters

Reading online data (25 minutes)

  • Reading CSV data Web sites
  • Scraping HTML
  • Q&A
  • Exercise: Download and use exchange rates to compare prices

Week 3: Analyzing our data (4 hours)

  • Sorting (30 min)
  • Presentation:
  • Sort_values
  • sort_index
  • Q&A
  • Exercise: Sorting

Grouping (25 minutes)

  • What is grouping?
  • Selecting the output
  • Aggregation methods
  • Q&A
  • Exercise: Group taxi distances and payments

Break (5 minutes)

Advanced grouping (30 min)

  • Grouping by multiple columns
  • Multiple methods
  • Q&A
  • Exercise: Group Olympic medalists by multiple columns

Pivot tables (25 minutes)

  • Grouping by multiple columns
  • Pivot tables
  • Q&A
  • Exercise: Create a pivot table comparing Olympic athlete heights by country and year

Break (5 minutes)

Joining (30 min)

  • Why join multiple data frames?
  • How to join
  • Q&A
  • Exercise: OECD tourism spending

Cleaning data (25 minutes)

  • Missing data
  • Bad or weird data
  • Q&A
  • Exercise: Find average oil prices, removing missing data

Break (5 minutes)

Basic plotting (25 minutes)

  • Line plots
  • Bar plots
  • Histograms
  • Q&A
  • Exercise: Find average oil prices, removing missing data

What’s next? (25 minutes)

  • What more can/should you learn to transition into data analytics?
  • Practice and exercises
  • How to read and use the Pandas documentation
  • Q&A

Your Instructor

  • Reuven M. Lerner

    Reuven M. Lerner is a full-time trainer, offering more than 30 courses in Python and data science to companies around the world. He’s the author of Python Workout and Pandas Workout (Manning). His current project, AI-Assisted Python for Nonprogrammers, is available in early release on the O’Reilly platform. He also publishes two newsletters, Better Developers and Bamboo Weekly, and is a popular lecturer at conferences, having presented at both PyCon US and Euro Python for many years. Reuven has a bachelor’s degree in computer science and engineering from MIT, and a PhD in learning sciences from Northwestern University. He lives in Modi’in, Israel, with his wife and three children.

    linkedinXlinksearch

Skills covered

  • Python
  • Pandas