some warnings not being silenced · Issue #16306 · pandas-dev/pandas (original) (raw)
Some comparison operations seem to escape the silencing of numpy RuntimeWarnings. For example:
pd.DataFrame([0,0]).gt(pd.Series([0, np.nan]), axis=0)
pd.DataFrame([0,0]).lt(pd.Series([0, np.nan]), axis=0)
pd.DataFrame([0,0]).le(pd.Series([0, np.nan]), axis=0)
pd.DataFrame([0,0]).ge(pd.Series([0, np.nan]), axis=0)
all give
In [13]: pd.DataFrame([0,0]).gt(pd.Series([0, np.nan]), axis=0)
/home/dsm/sys/miniconda3/envs/36/lib/python3.6/site-packages/pandas/core/ops.py:1253: RuntimeWarning: invalid value encountered in greater
result = op(x, y)
This is working with some timeseries data after some rolling operations, and so there are going to be lots of NaNs floating around. It'd be nice if I didn't need to suppress them myself.
Output of pd.show_versions()
``` In [19]: pd.show_versions() /home/dsm/sys/miniconda3/envs/36/lib/python3.6/site-packages/xarray/core/formatting.py:16: FutureWarning: The pandas.tslib module is deprecated and will be removed in a future version. from pandas.tslib import OutOfBoundsDatetime
INSTALLED VERSIONS
commit: None
python: 3.6.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-77-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_CA.UTF-8
LOCALE: en_CA.UTF-8
pandas: 0.20.1
pytest: 3.0.7
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.25.2
numpy: 1.12.1
scipy: 0.19.0
xarray: 0.9.1
IPython: 5.3.0
sphinx: 1.5.1
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: 3.3.0
numexpr: 2.6.2
feather: None
matplotlib: 2.0.0
openpyxl: 2.4.1
xlrd: 1.0.0
xlwt: 1.2.0
xlsxwriter: 0.9.6
lxml: 3.7.3
bs4: 4.5.3
html5lib: 0.999
sqlalchemy: 1.1.6
pymysql: None
psycopg2: None
jinja2: 2.9.5
s3fs: None
pandas_gbq: None
pandas_datareader: None