← All series & guides

Series

Python for analytics

12 parts

Clean data, explore with pandas, and turn notebooks into reusable analysis you can trust at work.

Start with part 1 →

  1. 1 Why Python for analytics (and when to stay in SQL or Sheets) Python is optional for many analytics jobs, and that is a feature, not a failure. Learn when Sheets or SQL still win, when a notebook saves real hours, and how to pick tools without panic or status games.
  2. 2 Setup without tears Set up Python for analytics without the folklore that scares people off. Create a virtual environment, install pandas with pip, and load a tiny CSV so your first DataFrame feels boring, reliable, and ready for real work.
  3. 3 DataFrames as tables A pandas DataFrame is just a table with rows, columns, and types you can inspect. Learn to load a CSV, check shape and dtypes, rename columns, and map the object to Sheets and SQL tables you already know.
  4. 4 Selecting, filtering, and sorting in pandas Map SQL SELECT, WHERE, and ORDER BY onto clear pandas patterns you can debug at work. Select columns, filter with boolean masks, sort results, and keep method chains readable for real analysis.
  5. 5 Aggregations and groupby Learn pandas groupby as split-apply-combine, the same idea as SQL GROUP BY. Build sum, mean, count, and multi-metric aggregations, with a clear sales-by-region before and after table example.
  6. 6 Joins and merges in plain English Learn how pandas merges map to SQL joins, when row counts explode, and how to check keys with validate and indicator. A customers-and-orders walkthrough keeps grain honest before you sum anything important in a real report.
  7. 7 Missing data and dtypes Nulls, empty strings, and bad dtypes break joins and totals in quiet ways. Learn safe pandas casting with coerce, careful fill versus drop, and a symptom-to-fix table you can reuse on messy workplace CSVs.
  8. 8 A light cleaning pipeline Turn ad-hoc notebook cells into a light load-clean-validate-summarize pipeline you can trust. Small functions, row-count checks, and cold-start reruns make your Python analytics reproducible for teammates.
  9. 9 Export results and hand off Finish the job with clean CSV exports, optional Parquet or SQL loads, and short metadata notes for every file. Learn what each destination needs so BI tools and teammates can trust your Python results.
  10. 10 Python and SQL together Use SQL for large filters and governed aggregates, then polish results in pandas. Learn a read_sql hybrid pattern, when each tool wins, and how to review AI-generated code before you trust the numbers.
  11. 11 Intro to plotting for analysis A chart for analysis is a decision tool, not decoration. Learn a small matplotlib stack that turns pandas groupbys into honest bars and lines you can explain at work.
  12. 12 Notebooks vs scripts for teammates Notebooks help you explore. Scripts help you repeat. Learn when to stay in a notebook, when to graduate to a .py file, and how to hand work to teammates without chaos.