-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
groupby.agg (first, last, min, etc...) returns incorrect results for uint64 columns #26310
Labels
Milestone
Comments
Looks like there is coercion behind the scenes to float which is causing the precision loss. Investigation and PRs would certainly be welcome |
WillAyd
added
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Groupby
labels
May 7, 2019
this is a duplicate issue / have to search for it |
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 12, 2019
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 12, 2019
4 tasks
@WillAyd is correct: It seems to happen on line 489 here: pandas/pandas/core/groupby/ops.py Lines 483 to 489 in 6d7ba05
uint64 won't convert to int64 so it's coerced to float64. |
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 13, 2019
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 13, 2019
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 14, 2019
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 16, 2019
mahepe
pushed a commit
to mahepe/pandas
that referenced
this issue
May 16, 2019
jreback
pushed a commit
that referenced
this issue
May 18, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Problem description
groupby.agg (first, last, min, etc...) returns incorrect results for uint64 columns
Expected Output
expect same results in both cases below:
x
y
1 6903052872240755750
2 6903052872240755750
x
y
1 6903052872240755712
2 6903052872240755712
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.6.8.final.0
python-bits: 64
OS: Darwin
OS-release: 18.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.24.2
pytest: None
pip: 19.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
The text was updated successfully, but these errors were encountered: