I have an excel file with 200 rows, 2 of which have comma separated values in them. If I output them to tab-separated, it would look like this:
col1 col2 col3
a b,c d,e
f g,h i,j
I need to explode to get a dataframe like this, exploding 200 rows into ~4,000:
col1 col2 col3
a b d
a b e
a c d
a c e
f g i
f g j
f h i
f h j
I don't see any explode functionality in pandas and haven't been able to figure out how to do this having the columns of comma-separated values uneven in length - not sure how split would work here.
Help me stack-overflow, you're my only hope. Thanks!