data frame list value change to string

Solutions on MaxInterview for data frame list value change to string by the best coders in the world

showing results for - "data frame list value change to string"
Sara Sofía
31 Jan 2020
1df['liststring'] = df['lists'].agg(lambda x: ','.join(map(str, x)))
Guadalupe
21 Apr 2016
1df['liststring'] = [','.join(map(str, l)) for l in df['lists']]
2df
3
4                lists    liststring
50  [1, 2, 12, 6, ABC]  1,2,12,6,ABC
61     [1000, 4, z, a]    1000,4,z,a