I have a pandas dataframe that looks like this:
COL data
line1 [A,B,C]
where the items in the data column could either be a list or just comma separated elements. Is there an easy of way of getting:
COL data
line1 A
line1 B
line1 C
I could iterate over the list and manually duplicate the rows via python, but is there some magic pandas trick for doing this? The key point is how to automatically duplicate the rows.
Thanks!