Currently I am using suicide rates overview.csv data from kaggle. I have an age column in which ages are into range. I want to categorize them into a specific age category so that i could use that for data pre-processing.

dataset['age'] -

age 15-24 35-54 55-74 75+

Is there anyone who would like to help me out what i am supposed to do with this age group so that it won't display error i.e '<' not supported between instances of 'int' and 'str'?

while using standardscaler
It throws an error i.e could not convert string to float: '25-34'

0 Answers