Skip to content

use_inf_as_null makes fillna extremely slow #12257

Closed
@Winand

Description

@Winand

Setting mode.use_inf_as_null=True makes fillna extremely slow (about 14sec).

The most of time is spent on self._data.fillna (core/generic.py:2833)

import pandas as pd
pd.set_option("mode.use_inf_as_null", True) #+/-inf -> None
s=pd.read_msgpack(r"D:\slow_fillna.msgpack", encoding='utf-8')
s2=s.fillna("<Н/Д>")

slow_fillna.msgpack.gz

python: 3.4.3.final.0
python-bits: 32
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en

pandas: 0.17.1
nose: 1.3.7
pip: 7.1.2
setuptools: 18.7.1
Cython: 0.23.4
numpy: 1.9.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatePerformanceMemory or execution speed performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions