Skip to content

Panel.iloc[] broken #3617

@joeb1415

Description

@joeb1415

Panel.iloc[] doesn't index correctly given a mix of scalars and ranges

from pandas import Panel, date_range
from numpy.random import randn

p = Panel(randn(4, 4, 4))

print(p.iloc[:3, :3, :3].shape)
print(p.iloc[1, :3, :3].shape)
print(p.iloc[:3, 1, :3].shape)
print(p.iloc[:3, :3, 1].shape)
print(p.iloc[1, 1, :3].shape)
print(p.iloc[1, :3, 1].shape)
print(p.iloc[:3, 1, 1].shape)

Returns

[3, 3, 3]
(4, 3)
(4, 3)
(3, 3)
(3L,)
(4L,)
(4L,)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions