Converting list of string into dataframe row
I have the following continent to country
pd.DataFrame({'asia':[['china','india','australia']],
'europe':[['spain','uk','russia','france','germany']],
'americas':[['canada','usa','mexico']]
}).transpose()
How do I convert into
asia | china
asia | india
asia | australia
europe | spain
europe | uk
etc. .
Comments
Post a Comment