I have data like the following:
| Column A |
|---|
| ['A','B'] |
| [] |
I would like to get the first item from each list so that it would look like this:
| First A |
|---|
| 'A' |
| '' |
I have tried several things, but the most recent is: df['First A'] = df['Column A'].str.list[0]
I get this error: AttributeError: Can only use .str accessor with string values!
It seems that I only get the error when trying to pull the value from the empty lists.