Skip to content

pd.DataFrame.describe Invalid value encountered in percentile #13331

@chenyun90323

Description

@chenyun90323

In RHEL 7.2, with python 2.7.5

    a = pd.np.random.randn(10, 2)
    a.itemset((3, 0), pd.np.NAN)
    df = pd.DataFrame(a)
    res = df.describe()

Output:

   /.../function_base.py:3823: RuntimeWarning: Invalid value encountered in percentile
  RuntimeWarning)
              0          1
count  8.000000  10.000000
mean  -0.406550  -0.220345
std    1.517141   0.791003
min   -1.942997  -1.607897
25%         NaN  -0.683385
50%         NaN  -0.281060
75%         NaN   0.303566
max    2.275532   1.227234

pd.show_versions:

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.5.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-327.18.2.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.18.1
nose: None
pip: 8.1.2
setuptools: 0.9.8
Cython: None
numpy: 1.11.0
scipy: 0.17.1
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 1.5
pytz: 2012d
blosc: None
bottleneck: 1.0.0
tables: None
numexpr: 2.5.2
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDuplicate ReportDuplicate issue or pull requestMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions