One of the columns in my dataframe is a list. Here is what it looks like -
| Column1 | Column2 |
|---|---|
| 1 | ['a','b'] |
| 2 | ['b'] |
I want to remove the string b from the list in Column2. I am trying the following -
df=df['Column2'].map(lambda x: if 'b' in x then x.remove('b'))
Can someone please help me out?