Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Grouping a 2 rows DataFrame by time and columns doesn't work as expected #11185
Comments
|
hmm, looks like the result index is not correctly named. Will mark it as a bug. Pull requests are welcome. |
jreback
added Timeseries Groupby Prio-medium Difficulty Novice Effort Low
labels
Sep 24, 2015
jreback
added this to the
Next Major Release
milestone
Sep 24, 2015
rinoc
referenced
this issue
Sep 29, 2015
Merged
BUG: groupby list of keys with same length as index #11202
|
I took a shot at solving this. It seemed that the following block of code is being executed in the case where there are two rows since 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)]My solution was to add another clause in the conditional that checks if any |
jreback
modified the milestone: 0.17.0, Next Major Release
Oct 1, 2015
|
closed by #11202 |
jreback
closed this
Oct 2, 2015
nbonnotte
referenced
this issue
Nov 24, 2015
Closed
BUG AttributeError: 'DataFrameGroupBy' object has no attribute '_obj_with_exclusions' #11640
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JCalderan commentedSep 24, 2015
Hi guys,
Working with pandas is great, however I might have notice a bug while grouping a 2 rows DataFrame by time and columns:
I have tried to group by key, instead of level, or to use another frequency for aggregating (using freq = 's' while building the dataframe, then aggregate with freq='T'), but the result is the same.
Did I miss something ?
Please, not that using the resampling API provide the expected result, but i think the grouping API should provide consistent results :
Here are the dependencies I have installed with pandas (working on Ubuntu 12.04.5 LTS):