I have a two columns Pandas data frame containing a list of user_ids and some URLs they have visited. It looks like this: I want to create a vector representation of itself, like this: I’ve tried different things, but keep hitting a wall. Any ideas? Answer What you’re describing is a pivot of the url column This puts the users