I have a DataFrame:
+-----+---------------+
|thing| things|
+-----+---------------+
| foo|[foo, bar, baz]|
| bar| [foo, baz]|
| baz| [baz]|
+-----+---------------+
And I want to check if thing
is in things
, i.e. the expected output should be:
+-----+---------------+---------------+
|thing| things|thing_in_things|
+-----+---------------+---------------+
| foo|[foo, bar, baz]| true|
| bar| [foo, baz]| false|
| baz| [baz]| true|
+-----+---------------+---------------+
How can I do this?