← All projects
Analytics

NYC Flights 2013 - SQL and Python Reconciliation

Rebuilt 17 SQL queries as equivalent pandas pipelines across 5 relational tables and 336,776 flights, and proved every result matches exactly.

Role
Student / Data Analyst
Team
Individual project
17 of 17 pandas-vs-SQL equality checks passed across 5 NYC Flights 2013 tables

Overview

A data-wrangling assignment for Deakin's Data Wrangling unit (postgraduate stream) demonstrating that pandas can faithfully reproduce SQL analysis - filtering, grouping, aggregating, sorting and multi-table joins - across the NYC Flights 2013 dataset.

The problem

Teams that report from both a SQL warehouse and a Python/pandas analysis layer need confidence that the two give identical answers - a join written two different ways, or a NULL handled inconsistently, silently breaks that trust.

My approach

Loaded five related tables (flights, airlines, airports, planes, weather - 336,776 flights in total) into both a SQLite database and pandas DataFrames, then wrote 17 SQL queries spanning filtering, grouping, aggregation, sorting and multi-table joins alongside pandas-native equivalents. Verified every pair of results programmatically with pd.testing.assert_frame_equal() rather than eyeballing them, so the reconciliation is provable rather than asserted - all 17 checks pass.

Tech stack

PythonPandasSQLSQLiteJupyter