Lesson 11.2 · Pro
Median from a count table
When data comes as "value, how many", expand it before taking a median, and drop duplicates first.
In this lesson
- Why you can't take the median of the rows
- Expand each row with generate_series
- Remove duplicate rows before the median
Go Pro to read this lesson
Pro unlocks every lesson and practice problem in SQL, Python, pandas and NumPy, with answers and step-by-step explanations.