0

Heyhey, I have the following dataframe:

df1:
col1 col2 col3 col4 
0    31    53   82
1    23    73   32 
2    35    34   12 
3    36    13   24 
4    23    93   36 

I want to delete all rows, which have in col1 value 2 or smaler, so it looks like:

df1:
col1 col2 col3 col4 
3    36    13   24 
4    23    93   36 

How can I do this? Thank you!

cosmonaut
  • 414
  • 1
  • 3
  • 14

1 Answers1

1

Just keep those that have a value above 2:

df1 = df1.loc[df1.col1 > 2]
Plasma
  • 1,903
  • 1
  • 22
  • 37