I am trying to search for the row
of which contains a string within a list.
df
:
Column1 Out1
0 ['x', 'y'] (0, 2)
1 ['a', 'b'] (3, 0)
etc.
I have attempted the following to search for the row that contains 'a'
in a list
under Column1
, as suggested in this answer:
print df['Column1'].isin(['a'])
With the expectation of such an outcome:
1 ['a', 'b'] (3, 0)
However, I seem to be receiving the following error:
TypeError: unhashable type: 'list'