Using pandas and I have a DataFrame like this:
+-------+---+
| item | x |
+-------+---+
| item1 | 0 |
+-------+---+
| item1 | 5 |
+-------+---+
| item1 | 6 |
+-------+---+
| item2 | 2 |
+-------+---+
| item2 | 3 |
+-------+---+
| item2 | 1 |
+-------+---+
And I'd like to merge the repeated values from the first column and expand the second column into a series just like this:
+-------+----+----+----+
| item | x1 | x2 | x3 |
+-------+----+----+----+
| item1 | 0 | 5 | 6 |
+-------+----+----+----+
| item2 | 2 | 3 | 1 |
+-------+----+----+----+