I have a data frame, where one of the column is days.to.play
. Now I want to drop any rows, where it is more than 1000. The name of the data frame is basketball_football_2
.
I tried couple of solutions such as:
basketball_football_2.loc[~(basketball_football_2['days.to.play'] > 1000)]
OR
basketball_football_2['day.to.play'] = basketball_football_2[basketball_football_2['day.to.play'] >= 1000]
OR
basketball_football_2.drop(basketball_football_2.loc[basketball_football_2['days.to.play']>=1000].index, inplace=True)
but it is dropping all the values and making the entire data frame empty.