10000 pandas give a warning when working with np.NaN values · Issue #9950 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content
pandas give a warning when working with np.NaN values #9950
Closed
@domenb

Description

@domenb

When I create a pandas.Series or pandas.DataFrame having np.NaN values, I get the following warning.

Example:

>>> import pandas as pd, numpy as np
>>> pd.Series([np.nan,np.nan,np.nan],index=[1,2,3])
1   NaN
2   NaN
3   NaN
dtype: float64
C:\Users\domen\Anaconda\lib\site-packages\pandas\core\format.py:1995: RuntimeWarning: invalid value encountered in absolute
abs_vals = np.abs(self.values)
C:\Users\domen\Anaconda\lib\site-packages\pandas\core\format.py:1998: RuntimeWarning: invalid value encountered in greater
has_large_values = (abs_vals > 1e8).any()
C:\Users\domen\Anaconda\lib\site-packages\pandas\core\format.py:1999: RuntimeWarning: invalid value encountered in less
has_small_values = ((abs_vals < 10 ** (-self.digits)) &
C:\Users\domen\Anaconda\lib\site-packages\pandas\core\format.py:2000: RuntimeWarning: invalid value encountered in greater
(abs_vals > 0)).any()

I am using Anaconda-2.2.0-Windows-x86_64, with Python 2.7.9. and pandas 0.16.0.

I would ask you to advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Numeric OperationsArithmetic, Comparison, and Logical operationsOutput-Formatting__repr__ of pandas objects, to_string

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0