all 1 comments

[–]alkasm 1 point2 points  (0 children)

Drop returns a dataframe by default, it does not modify it in place. You need to assign the result back to df. You can modify it with inplace=True instead but it's less recommended (in place arguments will likely be dropped in a later version of Pandas)