Drop rows in dask dataFrame on condition

Viewed 5511

I'm trying to drop some rows in my dask dataframe with :

df.drop(df[(df.A <= 3) | (df.A > 1000)].index)

But this one doesn't work and return NotImplementedError: Drop currently only works for axis=1

I really need help

1 Answers

You can remove rows from a Pandas/Dask dataframe as follows:

df = df[condition]

In your case you might do something like the following:

df = df[(df.A > 3) & (df.A <= 1000)]
Related