BUG: None and np.nan behave differently for .replace() #38510
Labels
Closing Candidate
May be closeable, needs more eyeballs
Duplicate Report
Duplicate issue or pull request
replace
replace method
Usage Question
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
pip freeze | grep pandas -> pandas==1.1.5
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
This is a problem because when creating a dataframe, both None and np.nan are converted into NaN. Therefore, one expect replacing will also treat them equivalently.
Expected Output
should return the same as
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here leaving a blank line after the details tag]The text was updated successfully, but these errors were encountered: