I have a dataframe as follows:
location | amount
---------------------------
1 new york $27.00
2 california $21.00
3 florida $19.00
4 texas $18.00
What I want to do is split the row where Location='California' into two rows where California turns into 'Sacramento' and 'Los Angeles' and the amount (21) gets divided into two, split between the two new rows.
This is the desired result:
location | amount
------------------------------
1 new york $27.00
2 los angeles $10.50
3 sacramento $10.50
4 florida $19
5 texas $18