I have a dataframe where one of the columns has 2 or more elements inside a list format, like the following:
Email Country
0 [email protected] [Czech Republic, Singapore, United Kingdom]
1 [email protected] [Singapore, United Kingdom]
2 [email protected] [United Kingdom, Czech Republic]
I need to do the following: - Duplicate the number of rows by list lenght in "Country" (so for example, first row would be duplicated twice) - For each row, I would need to have as index one of the list elements (so for example, one of them would be Czech Republic, the other row Singapore and the other row United Kingdow as index).
Does someone know how could I do it?
Thank you!