Pandas question: If I have this dataframe:
| Member | Value | Group |
|---|---|---|
| 1 | a | AC |
| 1 | c | AC |
| 1 | d | DF |
| 2 | b | AC |
| 2 | e | DF |
which I would like to transform, using pivot?, to a DataFrame showing occurences of individual elements of the group, like:
| x | AC | DF |
|---|---|---|
| 1 | ac | d |
| 2 | b | e |
I run into "Index contains duplicate values, cannot reshape" if I try:
pivot(index='Member', columns=['Group'], values='Value')
Feel confused over something seemingly very trivial. Can somebody help?