different view when index a panel with multiindex #15762
Labels
Duplicate Report
Duplicate issue or pull request
Indexing
Related to indexing on series/frames, not to indexes themselves
MultiIndex
Code Sample, a copy-pastable example if possible
Problem description
I find a bug when using panel.apply(), and with some digging, I find an interesting indexing problem caused by multiindex in Panel Object. It is demonstrated below:
Output:
With a multiindex as the major_axis of Panel object, the indexing result is transposed. And because of that, when using
pn.apply(func, axis=('items','major'))
, it give you the wrong results when the major_axis is a multiindex.Is this a bug? if not, then what is the purpose that it is designed like this?
Thanks for help.
The text was updated successfully, but these errors were encountered: