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

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation