My new data is grouped by
from it's source, so is there any code that can breakdown or un-group the data then assign its value based on what column it was grouped.
the table looks like this
| age | education | city | male | female
| 28 | Secondary | x | 0 | 2
| 28 | University| x | 1 | 2
| 29 | Primary | y | 1 | 0
i want the code do something like this
| age | education | city | gender |
| 28 | Secondary | x | female |
| 28 | Secondary | x | female |
| 28 | University| x | male |
| 28 | University| x | female |
| 28 | University| x | female |
| 29 | Primary | y | male |