Skip to content Skip to sidebar Skip to footer

Deleting Row From Dataframe Based On Any Column Value

I have a dataframe of the sort: Plate | MeanV1 | MeanV2 | MeanV3 ...etc ----------------------------------------------- 0 1 | 3.2 | 4.8 | 6.8 | 1 1 | 3.1

Solution 1:

Use iloc for select range of columns, here all without first, compare by all values with DataFrame.all:

df =  df[(df.iloc[:, 1:] != 10000).all(axis=1)]
print (df)
   Plate  MeanV1  MeanV2  MeanV3
0      1     3.2     4.8     6.8
2      2     2.8     4.6     6.1

Post a Comment for "Deleting Row From Dataframe Based On Any Column Value"