I want to convert names of a pandas dataset into numbers. I have a dataset made with pandas that looks like this: Dataset. I want the user_id and business_id to be numbers. So that i can easily go to user 1 and business 1. I dont know how to do this while still keeping the ids identical. So i dont want the same business to have two different numbers. Does anyone know how i can do this easily? I know how to convert the id's to numbers but i dont know how i can make sure that the same id keeps the same number.