#Converting Product_Category from uint8 into integers and then assign the values back to df df['Product_Category']=df['Product_Category'].astype(int)