I have a binary variable in my dataframe (people are older than 65 years or not) and the total amount of people for the two groups for several years.
I would like to have only one row for each year, so one column would show the amount of people older than 65 and one column the amount of people younger than 65.
How can I split my column with the binary variable up to make two columns out of it?
Thank you very much for your answer.