Open briandamaged opened 1 year ago
FYI: Just confirmed that the issue is present in main
as well.
I have a feeling that the issue is introduced at one of the following locations:
I'll hopefully have some time to poke around at it later today. In the meantime, here's a quick comparison of the differing "zero values":
>>> fake_zero
5.397605346934028e-79
>>> fake_zero.tobytes()
b'\x00\x00\x00\x00\x00\x00\xb0/'
>>> real_zero
0.0
>>> real_zero.tobytes()
b'\x00\x00\x00\x00\x00\x00\x00\x00'
Bump
Pandas version checks
[X] I have checked that this issue has not already been reported.
[X] I have confirmed this bug exists on the latest version of pandas.
[x] I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
(Note: issue was originally reported in #30051 )
Occasionally,
pandas.read_sas(..)
interprets some "zero values" as5.397605e-79
.This issue can also be observed in the 2019 Survey of Consumer Finances when using
pandas==1.5.2
:https://www.federalreserve.gov/econres/files/scf2019x.zip
After you unzip the file, you can recreate the issue as follows:
This produces the following output:
According to the survey's documentation, these values were all intended to be equal to
0
.Expected Behavior
These values should all be equal to
0.0
.Installed Versions