Skip to content

BUG: v1.5.0 dataframe.replace function cause python to crash #48843

Closed
@WilliamQue

Description

@WilliamQue

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

import pandas as pd
import numpy as np

t = pd.DataFrame({'a':[1,3,2,np.nan]})
t.replace(np.nan,None,inplace=True)

Issue Description

After using replace function, python will crash.

Expected Behavior

Nothing

Installed Versions

INSTALLED VERSIONS

python : 3.9.13.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 165 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : Chinese (Simplified)_China.936
pandas : 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions