-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Open
Labels
BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateSeriesSeries data structureSeries data structure
Description
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of pandas (1.0.5)
series = pd.Series({'1':1,'2':None,'3':np.nan, '4':''})
will create a series which looks like:
1 1 2 None 3 NaN 4 dtype: object When using the fillna method on this series on index 3 it changes also the entry in index 2!
series.fillna({'3':0}) This will result in a output as follows:
1 1 2 NaN 3 0 4 dtype: object Problem:
The value at index 2 changed from None to NaN.
Expected Behaviour:
The value at index 2 should never be touched when using fillna and specifying the indices you want to alter.
velikod
Metadata
Metadata
Assignees
Labels
BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateSeriesSeries data structureSeries data structure