4Course 4Business analyticsIntermediate
Python for Data Analysis
Pandas, notebooks, and the habits that turn a one-off script into an analysis you can rerun next month.
- Chapters
- 12
- Time
- 12 hours
- Format
- Self-paced
- Tools
- Python, pandas, Jupyter or Google Colab, matplotlib
What you will be able to do
- Load CSVs, Excel files, and SQL results into pandas and inspect them properly.
- Clean and reshape data: types, missing values, merges, pivots, and group-bys.
- Work with dates and time series: resampling, rolling windows, and IST-aware timestamps.
- Plot results that are good enough for a meeting without a design pass.
- Structure a notebook so it reruns from top to bottom and someone else can follow it.
Chapters
12 chapters. Chapter 2 is free below.
- 1
Setting up without pain
Colab or a local install, and the two ways to load data you will use ninety percent of the time.
- 2
DataFramesFree to read
Rows, columns, index. Selecting, filtering, sorting.
- 3
Types and cleaning
Numbers as strings, dates as strings, categories with typos, missing values.
- 4
Group-by and aggregation
Split, apply, combine. Multiple aggregates at once.
- 5
Merging tables
Joins in pandas, validating them, and catching row explosions.
- 6
Reshaping
Pivot, melt, stack. Long versus wide and when each is right.
- 7
Dates and time series
Parsing, timezones, resampling by week or month, rolling averages.
- 8
Plotting
Quick charts with pandas and matplotlib; making them readable.
- 9
Reading from SQL and writing back
Pulling a query into pandas and pushing a result to a table or a sheet.
- 10
Notebook hygiene
Order of cells, functions, parameters at the top, and reruns.
- 11
Automating a report
From notebook to a script that runs on a schedule and emails a file.
- 12
Capstone: cohort retention analysis
Monthly cohorts, retention curves, and a reusable notebook.
Free chapter 2 of 12
DataFrames
A DataFrame is a table: rows, columns, and an index that labels the rows. If you have used a spreadsheet or SQL, nothing here is new except the vocabulary. df.head() shows the first rows. df.shape tells you how many rows and columns. df.dtypes tells you what pandas thinks each column is, and this is the first thing to check, because a number stored as text will quietly break every calculation downstream.
Selecting a column is df['amount']. Selecting rows by a condition is df[df['amount'] > 1000]. Combining conditions uses & and | with brackets around each part. These three patterns cover most of the filtering you will ever do, and getting fluent in them matters more than knowing any advanced feature.
The mistake that costs beginners the most time is confusing the index with a column. When you filter or sort, the index keeps its old labels, so row 'zero' might now be the fifth row. reset_index(drop=True) fixes it. You will type that a hundred times in this course until it becomes reflex.
The chapter's exercise loads a payments export with 40,000 rows, finds the ten largest refunds, and computes the refund rate by payment method. It is the same exercise as chapter 5 of SQL for Analysts, on purpose: seeing the same question answered in both tools is the fastest way to understand when to reach for which.
Who it is for
Analysts who have hit the limits of spreadsheets and SQL and need to clean, combine, and analyse larger or messier data.
Before you start
SQL for Analysts or equivalent. No prior Python.
Taught by
Paul Montero
Founder and instructor
Questions about this course
How long do I have access?
Is the dataset included?
Can I get a refund?
incl. GST, 7-day refund