We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
precision=3
include_lowest=True
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
a = pd.Series(np.linspace(-0.9999999, 10, 200)) pd.cut(a, 10, retbins=True, include_lowest=True, precision=3)
lowest value should be precision=3
commit : 4bfe3d0 python : 3.8.8.final.0 python-bits : 64 OS : Windows OS-release : 10 Version : 10.0.19041 machine : AMD64 processor : AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD byteorder : little LC_ALL : None LANG : None LOCALE : Chinese (Simplified)_China.936
pandas : 1.4.2 numpy : 1.19.5 pytz : 2021.1 dateutil : 2.8.1 pip : 22.0.4 setuptools : 44.0.0 Cython : 0.29.23 pytest : 6.2.3 hypothesis : None sphinx : 4.0.1 blosc : None feather : 0.4.1 xlsxwriter : 1.3.8 lxml.etree : 4.6.3 html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : 3.1.1 IPython : 7.22.0 pandas_datareader: None bs4 : 4.9.3 bottleneck : 1.3.2 brotli : fastparquet : None fsspec : 2021.07.0 gcsfs : None markupsafe : 2.1.1 matplotlib : 3.3.4 numba : 0.53.1 numexpr : 2.7.3 odfpy : None openpyxl : 3.0.7 pandas_gbq : None pyarrow : 7.0.0 pyreadstat : None pyxlsb : None s3fs : 2021.07.0 scipy : 1.6.2 snappy : None sqlalchemy : 1.4.7 tables : 3.6.1 tabulate : 0.8.9 xarray : None xlrd : 2.0.1 xlwt : 1.3.0 zstandard : None
The text was updated successfully, but these errors were encountered:
Thanks @eromoe for the report.
The bug appears to be in the rounding and adjust logic in _format_labels in pandas/core/reshape/tile.py
_format_labels
pandas/core/reshape/tile.py
further investigations and PRs welcome.
Sorry, something went wrong.
closing as duplicate of #33912
No branches or pull requests
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Expected Behavior
lowest value should be precision=3
Installed Versions
INSTALLED VERSIONS
commit : 4bfe3d0
python : 3.8.8.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : AMD64 Family 25 Model 33 Stepping 0, AuthenticAMD
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Chinese (Simplified)_China.936
pandas : 1.4.2
numpy : 1.19.5
pytz : 2021.1
dateutil : 2.8.1
pip : 22.0.4
setuptools : 44.0.0
Cython : 0.29.23
pytest : 6.2.3
hypothesis : None
sphinx : 4.0.1
blosc : None
feather : 0.4.1
xlsxwriter : 1.3.8
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.1.1
IPython : 7.22.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
brotli :
fastparquet : None
fsspec : 2021.07.0
gcsfs : None
markupsafe : 2.1.1
matplotlib : 3.3.4
numba : 0.53.1
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 7.0.0
pyreadstat : None
pyxlsb : None
s3fs : 2021.07.0
scipy : 1.6.2
snappy : None
sqlalchemy : 1.4.7
tables : 3.6.1
tabulate : 0.8.9
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
zstandard : None
The text was updated successfully, but these errors were encountered: