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
  • 100
  • 8
  • 52
  • 121
  • 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
  • 296,997
  • 19
  • 147
  • 204