Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Error when key-only Grouper is passed to groupby in a list #14334
Comments
|
This probably should work, thanks for the report! But I'm curious, why are using a |
chris-b1
added Bug Groupby
labels
Oct 3, 2016
|
Yeah, good question. I'm in the process of working on implementing #5677 which will allow the |
This was referenced Oct 4, 2016
jreback
added this to the
0.19.1
milestone
Oct 19, 2016
jreback
closed this
in 4852008
Oct 25, 2016
jorisvandenbossche
added a commit
to jorisvandenbossche/pandas
that referenced
this issue
Nov 2, 2016
|
|
+ jorisvandenbossche |
1b53159
|
amolkahat
added a commit
to amolkahat/pandas
that referenced
this issue
Nov 26, 2016
|
|
+ amolkahat |
f2ebcfe
|
jmmease commentedOct 3, 2016
Overview
A
Grouperobject configured with only akeyspecification may be passed togroupbyto group a DataFrame by a particular column. For example:However, when this key-only
Grouperis passed togroupbyinside a list, aTypeErroris thrown. The following example is for a scalar list containing the sameGrouperobject as in the previous example.The same error occurs for lists containing multiple key-only
Groupers. e.g.[pd.Grouper(key='A'), pd.Grouper(key='B')]Expected Output
Output of
pd.show_versions()commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Darwin
OS-release: 15.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 23.0.0
Cython: 0.24
numpy: 1.11.1
scipy: 0.17.1
statsmodels: 0.6.1
xarray: None
IPython: 4.2.0
sphinx: 1.4.1
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.4
blosc: 1.4.1
bottleneck: 1.1.0
tables: 3.2.2
numexpr: 2.6.0
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.2
lxml: 3.6.0
bs4: 4.4.1
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.40.0
pandas_datareader: None