I have DataFrame containing values about shops and categories in one column.
| Date | Spent | ... | Category/Shop |
|---|---|---|---|
| 2022-08-04 | 126.98 | ... | Supermarkets |
| 2022-08-04 | NaN | ... | ShopName |
| 2022-08-04 | 119.70 | ... | Supermarkets |
| 2022-08-04 | NaN | ... | ShopName |
...
I need to separate last column into to columns:
| Date | Spent | ... | Category | Shop |
|---|---|---|---|---|
| 2022-08-04 | 126.98 | ... | Supermarkets | ShopName |
| 2022-08-04 | 119.70 | ... | Supermarkets | ShopName |
How can this be done?
We can assume that every second row in the Category/Shop column contains the name of the store that needs to be moved to a new column.