0

Existing Dataframe :

sr.no            col
1          ['ABC','CD','ABC']
2          ['AB']
3          ['CD','EF']

Expected Dataframe :

sr.no         col                col_1            col_2        col_3
1       ['ABC','CD','ABC']       'ABC'              'CD'        'ABC'
2            ['AB']              'AB'
3         ['CD','EF']            'CD'               'EF'

Approached it using explode but didn't getting the desired output. list in the col can include multiple strings and explode should work accordingly

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Romi
  • 181
  • 7

0 Answers0