1

Hi So I am fairly new to python, and I have a big dataframe that is as shown on the image

now i am asked to make a new column called age_group where i specify where that person belongs to. For example, the first row is 29 years old and so i want the new column to say "21-30".

i want to make 8 age group from 1-10,11-20,21-30,....,71-80

what code should i put so that all of the rows will show age group that is according to their age. Can anybody help me?

Carlo Silanu
  • 79
  • 1
  • 8

0 Answers0