datacarpentry / python-ecology-lesson

Data Analysis and Visualization in Python for Ecologists
https://datacarpentry.org/python-ecology-lesson
Other
160 stars 310 forks source link

Episode 5 outdated #492

Open dafnevk opened 3 years ago

dafnevk commented 3 years ago

In episode 5, the first few rows of the surveys.csv table show as:

       record_id  month  day  year  plot species  sex  hindfoot_length weight
0              1      7   16  1977     2      NA    M               32  NaN
1              2      7   16  1977     3      NA    M               33  NaN
2              3      7   16  1977     2      DM    F               37  NaN
3              4      7   16  1977     7      DM    M               36  NaN
4              5      7   16  1977     3      DM    M               35  NaN

Could it be that this an outdated version of the dataset and that NA species are now replaced with NL? That means the first line of code:

surveys_df = pd.read_csv("data/surveys.csv",
                         keep_default_na=False, na_values=[""])

Can be shortened to:

surveys_df = pd.read_csv("data/surveys.csv")

(as in the other episodes)