-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: groupby.agg coercing booleans #14873
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
this is a duplicate of this: #14423
I suppose we could be a little softer in the casting w.r.t. boolean results. (but of course someone will have an issue with that :) |
this is independent of #14423 looks like |
This looks fixed. Could use a test.
|
@mroeschke is this issue really fixed? In the #21240 issue referenced just above, @jreback says this issue is the root cause of that issue. And when I try to run the code part from that issue, the problem still seems to be there. |
#21240 isn't fixed but this specific case is fixed |
Code Sample, a copy-pastable example if possible
Problem description
By comparing
case_one
andcase_two
, it seems thataggregate
function turns boolean values sometimes to integers 1 or 0.For
case_one
we get,However for
case_two
we getExpected Output
For
case_two
we should getOutput of
pd.show_versions()
pandas: 0.19.1
nose: 1.3.7
pip: 8.1.2
setuptools: 23.0.0
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.2.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
This same issue appears in a different environment as well.
pandas: 0.18.1
nose: 1.3.7
pip: 9.0.1
setuptools: 23.0.0
Cython: None
numpy: 1.11.2
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.0.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.6.1
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.1.3
pymysql: None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: