0

So I have an array of rows indices (2, 5, 1,... ) I want to keep out from my dataframe. How to do such filtering in pandas?

DuckQueen
  • 772
  • 10
  • 62
  • 134
  • Have you read a tutorial yet? This is covered pretty early on in the material: `df = df.drop(index_list)` – cs95 Jul 02 '20 at 21:17

1 Answers1

1

You can do drop

a=np.array([2,5,1,..])
df=df.drop(a)
BENY
  • 317,841
  • 20
  • 164
  • 234