What would be the best way to loop through a dataframe with strings that I would like to split into multiple rows while retaining the other value at the same time?
input:
genres revenue
action|comedy|drama 5000
action|romance 10000
output:
genres revenue
action 5000
comedy 5000
drama 5000
action 10000
romance 10000