pivoting two column in pandas
You can accomplish what you want by doing:


  df.groupby('Users')['content'].unique().apply(pd.Series)


First, what you want is to groupby your values by users, to get all content values. Since you want unique ones, you can apply unique() built-in pandas function.

Then, since you will have a columns with a list of values, you can apply pd.Series to each row, to expand it into columns, by default, they are named from 0 to n, where n is the maximum length of a list, in this case, two.