Quantile fails when only NaNs on some rows/columns #15460
Labels
Bug
Duplicate Report
Duplicate issue or pull request
Numeric Operations
Arithmetic, Comparison, and Logical operations
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Uh oh!
There was an error while loading. Please reload this page.
Quantile method on DataFrame fails when there are NaNs in some specific way. Some cases it handles properly. I guess it's somehow related to cases when some rows and/or columns have only NaNs.
First, some working examples:
Code Sample, a copy-pastable example if possible
If I change the second element on the first column to NaN, it all breaks. Now there's one row and one column with only NaNs:
Problem description
In the first case, the quantiles are incorrect and in the second case, the quantile computation should not raise an error.
Expected Output
Output of
pd.show_versions()
pandas: 0.19.0
nose: None
pip: 8.1.2
setuptools: 27.2.0.post20161106
Cython: None
numpy: 1.11.1
scipy: 0.18.1
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.7
blosc: None
bottleneck: None
tables: 3.2.3.1
numexpr: 2.6.1
matplotlib: 1.5.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: 2.6.2 (dt dec pq3 ext lo64)
jinja2: 2.9.4
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: