I have a dataframe like this:
df = pd.DataFrame({'A': ['1', '2', '3'], 'B': ['aa', 'b', 'c']})
A B
0 1 aa
1 2 b
2 3 c
I want to convert each row of column B to a list. For example, my desired output is something like this:
df_new
A B
0 1 [aa]
1 2 [b]
2 3 [c]