There seem to be a lot of possibilities to pivot flat table data into a 3d array but I'm somehow not finding one that works: Suppose I have some data with columns=['name', 'type', 'date', 'value']. When I try to pivot via
pivot(index='name', columns=['type', 'date'], values='value')
I get
ValueError: Buffer has wrong number of dimensions (expected 1, got 2)
Am I reading docs from dev pandas maybe? It seems like this is the usage described there. I am running 0.8 pandas.
I guess, I'm wondering if I have a MultiIndex ['x', 'y', 'z'] Series, is there a pandas way to put that in a panel? I can use groupby and get the job done, but then this is almost like what I would do in numpy to assemble an n-d array. Seems like a fairly generic operation so I would imagine it might be implemented already.