I have a pandas dataframe df with pandas.tseries.index.DatetimeIndex as index.
The data is like this:
Time Open High Low Close Volume
2007-04-01 21:02:00 1.968 2.389 1.968 2.389 18.300000
2007-04-01 21:03:00 157.140 157.140 157.140 157.140 2.400000
....
I want to replace one datapoint, lets day 2.389 in column Close with NaN:
In: df["Close"].replace(2.389, np.nan)
Out: 2007-04-01 21:02:00 2.389
2007-04-01 21:03:00 157.140
Replace did not change 2.389 to NaN. Whats wrong?