-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Unexpected output of table pivoting when there is little data; a TimeGrouper object is in the index. #9485
New issue
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
Comments
Here's your example easily copy-pastable. FYI, you don't need to specify an Prob an edge case, a pull-request would be welcome.
|
https://github.com/pydata/pandas/blob/v0.15.2/pandas/core/groupby.py#L2079 the problem seems to be there. If I set |
This is duplicate of #8542 |
Closing as a duplicate. |
The following data is the contents of
table.csv
This is
table2.csv
:The output of print after pivoting
table.csv
I would expect something like this:
I can trace the problem to here:
https://github.com/pydata/pandas/blob/62529cca28e9c8652ddf7cca3aa6d41d4e30bc0e/pandas/tools/pivot.py#L114 the index created by groupby already has the object there.
I can't figure anything else. What is the problem, any fixes?
Thanks.
The text was updated successfully, but these errors were encountered: