DateTimeIndex appending with loc inconsistency in handling numpy datetime64 · Issue #9516 · pandas-dev/pandas (original) (raw)

@dashesy

This is in Pandas 0.15.2 (but I also tried it on '0.15.2-148-g484f668'):

df = pd.DataFrame() df.loc[np.datetime64(datetime.datetime.now()),'one'] = 100 df.loc[np.datetime64(datetime.datetime.now()),'one'] = 100

This is the output:

                               one
2015-02-18 14:50:05.606510     100
1970-01-17 11:37:51.007748755  100

It seems the the first usage of loc correctly works around limitations of datetime64 but I cannot explain the second one.