I have the following:
cl1 cl2 cl3 .... cln
0 aaa bbb ccc .... nnn
1 bbb aaa ccc .... nnn
2 xxx xxx xxx .... xxx
Need to select rows, which columns' value(any of them).lower() == 'aaa' So it is 0 and 1 rows and output shall be:
cl1 cl2 cl3 .... cln
0 aaa bbb ccc .... nnn
1 bbb aaa ccc .... nnn
I tried many ways, but all of them requires columns names to be specified, but in my case I have no idea about columns names.
So basically something similar would work if I know column names:
df.loc[~df['something1'].str.lower().str.strip().isin(['something2'])]