Indices of df.describe(percentiles=np.linspace(...)) are mix of integers and decimal numbers #26660
Labels
Numeric Operations
Arithmetic, Comparison, and Logical operations
Milestone
Code Sample, a copy-pastable example if possible
Problem description
If desc.index is printed out, some percentile indexes are written as decimal numbers (e.g. 30.0%, 55.0%, 85.0%), while others are whole numbers (e.g. 35%, 70%, 100%). Printing percentiles of distribution therefore requires hardcoding some decimal numbers, e.g.
Expected Output
Indexes of percentiles should be either all whole numbers or either all decimal numbers.
Output of
pd.show_versions()
pandas: 0.24.2
pytest: None
pip: 19.1.1
setuptools: 41.0.1
Cython: None
numpy: 1.16.3
scipy: 1.2.1
pyarrow: None
xarray: None
IPython: 7.5.0
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: 0.7.3
lxml.etree: 3.5.0
bs4: 4.4.1
html5lib: 0.999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.8
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
The text was updated successfully, but these errors were encountered: