Dataframe in question, df:
colA colB
1 [1, 4, 5]
4 [3, nan, nan]
I'm trying to return a Series which has True where colA's value is in colB's value for each row.
The result should be:
True
False
I tried: df.colA.isin(df.colB) - but that doesn't do the trick because colB's values are in lists
df.apply(lambda x: x['colA'] in x['colB'], axis=1)[a in b for a, b in zip(df['colA'], df['colB'])]