I have Dataframe contain locations by string and I want to explode using them
For example, df:
country | location | value |
---|---|---|
Canda | USA,Costa Rica, | 3 |
Italy | Germany,France,Spain | 2 |
Russia | Israel, | 1 |
my df :
country | location | value |
---|---|---|
Canda | USA | 3 |
Canda | Costa Rica | 3 |
Italy | Germany | 2 |
Italy | France | 2 |
Italy | Spain | 2 |
Russia | Israel | 1 |
I have a lot more then only one column such as value
and I want to make sure they are all duplicated