I have a data-frame that has multiple values in a cell that are delimited by a pipe and I need to map them to another cell with multiple pipe delimited values and then give them their own row along with data in the original row that doesn't have multiple values. My data-frame (df1) looks like this:
index name city amount
1 frank | john | dave toronto | new york | anaheim 10
2 george | joe | fred fresno | kansas city | reno 20
I need it to look like this:
index name city amount
1 frank toronto 10
2 john new york 10
3 dave anaheim 10
4 george fresno 20
5 joe kansas city 20
6 fred reno 20