Creating columns for category in rows

I have a dataframe that looks like this:

Screenshot 2022-06-17 134111

I would like to reshape the dataframe in order to have the agegroup categories as columns. Does anyone know how to do this?

This is one method: