I have a list name as list_1 like this:
[["xx ",'yy']
[["gg ",'xx']
[["xx ",'gg']]
Also, I have a df like this:
column1 column2............ coulymn_N
0 xx gg gg
1 gg xx yy
2 xx something else nan
I want to search line by line the list_1 into the df and return the matching
So for example an output for the first line of list_1 inside df could be
column1
0 xx
and also
column_N
1 yy
The problem that I have is that in my list i have more than one value ("xx ", and "yy") and so I am confusing. I do not think so that I can use the isin method.
Any ideas?