Data Analyst Program

Guided Project · Week 3 of 4 · 6 hours

Python Analysis and Exploratory Analysis

Go deeper with Python and explore the data for patterns you did not expect.

Learning objectives

By the end of this week you will be able to:

  • Load the clean data into pandas and reproduce key SQL results.
  • Calculate descriptive statistics and group comparisons.
  • Create charts that reveal distributions, trends and relationships.
  • Record findings and new questions.

Lessons

Python Analysis

Python lets you do things that are awkward in SQL: quick statistics, charts, and more flexible reshaping. Set up a notebook in the notebooks folder with clear sections, each starting with a text cell: 1. Load data, 2. Check, 3. Analysis by question, 4. Findings.

import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("../data/clean/rides_clean.csv", parse_dates=["start_time"])
df.groupby("rider_type")["ride_minutes"].describe()
df["weekday"] = df["start_time"].dt.day_name()
pd.pivot_table(df, values="ride_id", index="weekday", columns="rider_type", aggfunc="count")

Cross-check: reproduce one or two of your SQL results in pandas. If the numbers differ, find out why before going further.

Exploratory Analysis

Now follow the EDA checklist from the Statistics course, using your SMART questions as a guide but staying open to surprises:

  • Distributions: histograms and box plots of key numbers (df["ride_minutes"].plot(kind="hist")). Note the shape and outliers.
  • Comparisons: bar charts of averages by group.
  • Trends: line charts over time. Look for seasonality.
  • Relationships: scatter plots and df.corr(numeric_only=True).

For every chart, write one sentence underneath answering "So what?" For example: "Casual riders take rides 2.3 times longer than members, mostly on weekends." These sentences become your insights next week.

Keep a running list of new questions and limitations (for example "no data on rider age"). Mentioning limitations honestly makes your work more credible.

Watch

Practice

Build your analysis notebook. Include at least six charts, each with a "So what?" sentence, reproduce at least one SQL result, and list your new questions and limitations.

Check your understanding

Try each question first, then open it to see the answer.

Why reproduce a SQL result in Python?

To confirm both analyses agree and catch mistakes early.

What should you write under every chart?

A one-sentence "So what?" stating what the chart shows.

Why list limitations?

Being honest about what the data cannot show makes the analysis more credible.

Assignment

Checkpoint 3: submit your notebook with at least six annotated charts and your list of findings, questions and limitations.