kjam/data-wrangling-pycon

possible bug in answer

bootandy opened this issue · 1 comments

Hi I was working thru your example and noticed here:

df['hourly_kids_median'] = df.groupby('hour')['descendants'].transform(median)

Shouldn't this line

df.groupby('hour')['descendants'].transform(median)

be:

df.groupby('hour')['num_kids'].transform(median)

?

kjam commented

Thanks for the catch! It's now updated! 👍