I want to append a value to a list in my dataframe based on a condition.
Sample df:
| Name | List |
|---|---|
| Peter | [a, b c] |
| George | [d, e f] |
I want to add the values [g, h] to the list column if the name is George.
Desired output:
| Name | List |
|---|---|
| Peter | [a, b c] |
| George | [d, e f, g, h] |
Any suggestions?