alan-turing-institute / rds-course

Materials for Turing's Research Data Science course
https://alan-turing-institute.github.io/rds-course/
31 stars 13 forks source link

Improve Module 2 hands-on solutions #166

Open jack89roberts opened 1 year ago

jack89roberts commented 1 year ago

I think the instructions could also be improved/clarified, but the solutions would benefit from some more prose and I think some of the solutions use unnecessarily complex code (especially if we have Python beginners on this course), e.g.

missing = df.groupby("eqls_wave").apply(lambda g: g.isna().mean() * 100).round(3).transpose()

could be:

missing = df.isna().groupby(df["eqls_wave"]).mean()