Closed
Description
import pandas as pd
import numpy as np
data = np.random.randn(5, 100, 5)
panel = pd.Panel(data, items=list("AACDE"))
panel.iloc[0] # ValueError: Wrong number of dimensions
fr = panel.loc["E"]
fr.values.shape # (5, 100, 5) wrong
So this is another contrived example that I got from just running a battery of tests on random objects. Basically having a duplicate item key will bork the Panel
.
I'm actually not sure whether Panel is meant to be a collection of uniquely identified DataFrames, or more like a generic 3d container that has convenient semantics for its axes. I think at one point it was the former, but as more things pull from generic it's becoming the later?