Closed
Description
import pandas as pd
import numpy as np
ser = pd.Series(['a', 'b', np.nan])
print ser
ser.loc[ser.isnull()] = None
print ser
ser[ser.isnull()] = None
print ser
Output
0 a
1 b
2 NaN
dtype: object
0 a
1 b
2 None
dtype: object
0 a
1 b
2 NaN
dtype: object
I am not sure whether this behaviour is intentional. Using .loc[], None was correctly assigned but when using [], NaN was assigned instead. Thanks
I am using version 0.14.0-169-g7684b6e