I have a series with some floats and nan and I am trying to overwrite some of the missing data.
from pandas.core.series import Series
from datetime import datetime
d = {'name': None, 'purchase_date': None, 'value': 195146.0}
s = Series(d)
print(s['purchase_date'])
s['purchase_date'] = datetime(2019,1,3)
Note the odd error below on the last line even though I was able to access 'purchase_date' in the print statement.
ValueError: ['p' 'u' 'r' 'c' 'h' 'a' 's' 'e' '_' 'd' 'a' 't' 'e'] not contained in the index
.
Interesting enough, replacing the datetime line with a number works fine
s['purchase_date'] = 21