We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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,)
The text was updated successfully, but these errors were encountered:
DataFrame.iloc is fine though:
print(p.iloc[1].iloc[:3, :3].shape)
Returns:
(3, 3)
As expected.
Sorry, something went wrong.
Bug it was
thanks
pls give #3618 a try (and let me know if you find any other issues)
In [2]: print(p.iloc[:3, :3, :3].shape) (3, 3, 3) In [3]: print(p.iloc[1, :3, :3].shape) (3, 3) In [4]: print(p.iloc[:3, 1, :3].shape) (3, 3) In [5]: print(p.iloc[:3, :3, 1].shape) (3, 3) In [6]: print(p.iloc[1, 1, :3].shape) (3,) In [7]: print(p.iloc[1, :3, 1].shape) (3,) In [8]: print(p.iloc[:3, 1, 1].shape) (3,)
Successfully merging a pull request may close this issue.
Panel.iloc[] doesn't index correctly given a mix of scalars and ranges
Returns
The text was updated successfully, but these errors were encountered: