I have a pandas dataset that I want to downsize (remove all values under x).
The mask is df[my_column] > 50
df[my_column] > 50
I would typically just use
I think this works. Maybe there are better ways?
df = df.drop(df[df.my_column < 50].index)
You are missing the inplace parameter :
df.drop(df[df.my_column < 50].index, inplace = True)