I make a dataset which is about bike .Price of bike included into this datasets.Now I would like to categoriz the price into "cheap","moderate" & "expensive" based on the bike prices.
data2.loc[data2["PRICE"] < 50000,'PRICE_CATEGORY'] = 'cheap'
data2.loc[data2["PRICE"] < 520000,'PRICE_CATEGORY'] = 'expensive'
data2.loc[data2["PRICE"] < 170000,'PRICE_CATEGORY'] = 'moderate'
data2.head()
'<' not supported between instances of 'str' and 'int' I have converted the "PRICE" into integer but the error shown