-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
groupby, TimeGrouper error #8542
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
show pd.show_versions() |
|
BTW, with three elements in the dataframe, it seems to work:
|
the prob with 2 elements is that the frequency is not defined for the timeseries so maybe not behaving properly will mark as a bug |
Thanks! I'm not familiar with the internals of pandas, but I'll try. |
hey @jreback I found that check on the code that drives that behavior: https://github.com/pydata/pandas/blob/master/pandas/core/groupby.py#L2077 The if (not any_callable and not all_in_columns
and not any_arraylike and match_axis_length
and level is None):
keys = [com._asarray_tuplesafe(keys)] The thing is even if I remove Do you have any ideas on how to relax/remove the |
I think a way to make this work is to relax the freqency inference engine to only require 2 dates (though this may break lots of other things, not sure).
|
@victorpoluceno did you figure out a solution? |
This looks to be fixed by current master. Adding tests and close.
|
The following code seems to raise an error, since the result object does not make sense (well, at least to me):
I would expect, for Out[68], two groups, one for each (date, event) pair.
Am I wring, or this is a bug?
The text was updated successfully, but these errors were encountered: