Closed
Description
xref #14179
xref #12499
xref #18027
but .loc
works
In [50]: df = pd.DataFrame(index=pd.date_range(start,periods=1), columns=['timenow','Live'])
In [51]: df.at[start,'timenow'] = datetime.today() # initial value
In [52]: df
Out[52]:
timenow Live
2014-04-01 2014-04-23 12:42:38.883082 NaN
[1 rows x 2 columns]
In [53]: df._data
Out[53]:
BlockManager
Items: Index([u'timenow', u'Live'], dtype='object')
Axis 1: <class 'pandas.tseries.index.DatetimeIndex'>
[2014-04-01]
Length: 1, Freq: D, Timezone: None
ObjectBlock: [timenow, Live], 2 x 1, dtype: object
In [54]: df = pd.DataFrame(index=pd.date_range(start,periods=1), columns=['timenow','Live'])
In [55]: df.loc[start,'timenow'] = datetime.today() # initial value
In [56]: df
Out[56]:
timenow Live
2014-04-01 2014-04-23 12:43:00.554915 NaT
[1 rows x 2 columns]
In [57]: df._data
Out[57]:
BlockManager
Items: Index([u'timenow', u'Live'], dtype='object')
Axis 1: <class 'pandas.tseries.index.DatetimeIndex'>
[2014-04-01]
Length: 1, Freq: D, Timezone: None
DatetimeBlock: [timenow, Live], 2 x 1, dtype: datetime64[ns]