5

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

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Mdhvince
  • 103
  • 1
  • 7

1 Answers1

6

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)]
MRocklin
  • 55,641
  • 23
  • 163
  • 235