Screen Link:
https://app.dataquest.io/m/467/communicating-results/4/removing-duplicates
My Code:
paid = paid.sort_values(by=['Reviews'], ascending=False)
paid = paid.drop_duplicates(subset=['App'], keep='first')
print(paid.duplicated('App').sum())
paid = paid.reset_index(inplace=True, drop=True)
What I expected to happen:
Without the inplace=true, it had worked already. After looking at the answer, i saw that DQ used a lot of inplace=True and thought I would try it and see how it would change my dataframe.
What actually happened:
paid is a NoneType, but we expected it to be a DataFrame.
What happened?? Is it because I used keep=‘first’?? Like, do i have to use one or the other??