I need to fill the empty list in my dataframe array column using some string
| array |
|-------------|
| [] |
|['pos','neg']|
| [] |
I want to replace empty list with string value
| array |
|-------------|
|['neg'] |
|['pos','neg']|
|['neg'] |
df['array'] = df['array'].apply(lambda x: x if x else ['neg'])