convert from list to str in python pandas code example
Example 1: data frame list value change to string
df['liststring'] = df['lists'].agg(lambda x: ','.join(map(str, x)))
Example 2: data frame list value change to string
df['liststring'] = [','.join(map(str, l)) for l in df['lists']]
df
lists liststring
0 [1, 2, 12, 6, ABC] 1,2,12,6,ABC
1 [1000, 4, z, a] 1000,4,z,a