D’oh! Unevenly spaced time series analysis of The Simpsons in Pandas
summary
Uses Pandas and the data.world API to load The Simpsons CSVs, cleans mixed-type columns, and builds a per‑character DataFrame (num_lines, num_episodes, first/last episode/season) by combining groupby/size/count, merge and reset_index. Applies shift() and transform() to detect location changes and reports about 17,000 scene changes, notes 564 scripted episodes vs 600 total (36 missing), and finds Homer has roughly twice Marge’s lines. Notebooks and a cleaning module live at gumption/pydata‑simpsons on GitHub.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 6:03Tutorial goals
- 11:10Pandas and data cleaning
- 20:08Why The Simpsons
- 26:44Simpsons dataset cleaning
- 36:26Merging episodes and scripts
- 42:16Time series basics in Pandas
- 47:25Script lines per episode
- 58:52Visualizing line distributions
- 1:04:27Season statistics
- 1:10:38Character data frames
- 1:20:57Episodes per character
- 1:30:27Uneven time series overview
- 1:33:12Scene changes by location
- 1:42:47Final scene analysis and summary
related talks
01h 54mPandas Dataframes At The Cinema
01h 27mCleaning and Tidying Data in Pandas
31mEffective Data Analysis with Pandas Indexes
01h 31mPandas, Data Wrangling & Data Science
30mTesting Pandas- Shoots, leaves, and garbage!
01h 24mIntroduction to Data-Analysis with Pandas
01h 43m(Serious) Time for Time Series
01h 04mVisualising Data through Pandas
