I have a column of age values that I need to group by in columns.
For example in this dataframe I have:
and would like to get to:
I did this to try to filtering it out and get the data but its returning nothing.
data_df = df[df['Age'] <= 30]
data_df
and its not working correctly and I got an error.
ValueError: cannot reindex from a duplicate axis

