~/talk

Analyzing Data: What pandas and SQL Taught Me About Taking an Average

Talkat PyCon 2018 · on Friday, 2018-05-11· [python, databases]

Code examples in pandas and SQL show the concrete mistake: taking np.mean()/AVG() over raw rows yields 6.6 apples but aggregating by day yields 11 apples, a twofold error in this example. The walkthrough builds queries and a practical pattern — collapse the data to the analysis granularity, then group — summarized as collapsing key - grouping key = observation key. Demos include the wrong query, the corrected query, and the surprising numeric impact.

AI-written summary · about

  1. 0:00Introduction
  2. 2:20The Problem
  3. 15:38The Pitfall
  4. 17:24Why are we doing it
  5. 18:57Defining a collapsing key
  6. 19:36Why does it not work
  7. 20:49What if it doesnt work
  8. 22:46The big deal
  9. 24:12Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.