I have a dataframe which contains list item in a column.
Example: df:
column1, column2, column3
1 'c' ['d']
2 'x' []
3 'foo' ['car']
so I want to append another item into column3
the result should be like this
column1, column2, column3
1 'c' ['d','t']
2 'x' ['t']
3 'foo' ['car','t']
Currently I use the method like this
df['column3']=df['column3'].apply(lambda x: x.append('t'))
But the the column3 became
column1, column2, column3
1 'c' none
2 'x' none
3 'foo' none
Wonder how to do that using apply function