-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Pandas 0.18.1 df.groupby().count() throws "ValueError: Buffer has wrong number of dimensions" when one of the counted columns has dtype datetime64 #13393
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
Yeah this is an issue, I thought it was a duplicate, but can't seem to find an open one. its a bit to fix, but pull-requests welcome. You can do this.
|
as an FYI, pls paste code as markdown. I edited the above. |
sorry about the lack of markdown, will use going forward. |
@jfries sure, and that's why its marked as a bug. |
This seems related to why the following no longer works in 0.18.1:
this also used to work |
@alan-wong I don't think that is related. In your example, there are no columns left to count the values, so I think it is correct that it does not work. But you are right the behaviour did change. Previously it returned an empty dataframe, now it does give an error. |
@jorisvandenbossche I get an empty dataframe on version 0.18.1 not sure what version I was running when I posted this answer: http://stackoverflow.com/questions/22391433/count-the-frequency-that-a-value-occurs-in-a-dataframe-column/22391554#22391554 but it used to work it does raise an error if you pass |
@alan-wong Ah, indeed, on 0.18.1 it does work correctly, but on master not anymore. So that indeed looks like a bug. Do you want to open a new issue? |
@jorisvandenbossche but is it correct behaviour that it's empty? Are you saying that in older versions it shouldn't have worked? I'll post an issue |
@jorisvandenbossche posted issue: #13530 |
I've confirmed the error does not occur in Pandas 0.16 on a similar machine.
Code Sample, a copy-pastable example if possible
Observed output
Expected Output
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: