There is a dataframe, like the following :
id a b c d e
a 23_2_1 34_55_0 34_55_0 -1_-1_-1 34_55_0
b 3_55_0 34_55_0 34_55_0 34_55_0 34_55_0
c -1_-1_-1 34_55_0 34_55_0 34_55_0 -1_-1_-1
d 34_55_0 -1_-1_-1 34_55_0 34_55_0 34_55_0
e 34_55_0 34_55_0 34_55_0 34_55_0 34_55_0
f 34_55_0 34_55_0 34_55_0 34_55_0 34_55_0
I want to delete the rows that if there is value of columns is '-1_-1_-1' in the dataframe, and also extract the id that include the '-1_-1_-1'.
My trying:
lst_col = list(df.columns)[:-1]
df2 = df_bl[~df_bl[lst_col].isin(['-1_-1_-1'])]