abjer / isds2020

Introduction to Social Data Science 2020 - a summer school course abjer.github.io/isds2020
58 stars 92 forks source link

0.4.5 and 0.4.6 #19

Open MariusMMa opened 3 years ago

MariusMMa commented 3 years ago

Hi! I have some problems with the following exercises:

0.4.5: I have sorted the indexes, so that the numbers are natural again:

df3_sorted = df3_sorted.reset_index(drop=True) print(df3_sorted)

however, it shows an assertion error... did I not drop the old one? not quite sure how to do that.

0.4.6:

df_sorted = df_weather.sort_values(by = max(obs_value), inplace = True)

The code does not work.. what should I change?

jsr-p commented 3 years ago

hi @MariusMMa , regarding your first question: What does your dataframe look like? What code have you used to create the dataframe? Regarding your second question: When you sort a dataframe you usually do it by a specific column. max(obs_value) is not a column :)