ts = pd.Timestamp.now()
vals= [ts.date(), ts.to_pydatetime()]
ser = pd.Series(vals) # <- dt64 dtype
idx = pd.Index(vals) # <- object dtype
Index uses lib.maybe_convert_objects for inference while Series uses infer_datetimelike_array in maybe_infer_to_datetimelike.
Ideally these would match.
Comment From: jorisvandenbossche
Personally, if I would have to choose, I prefer the Index behaviour. I don't think we should automatically convert datetime.date objects to datetime dtype.
For the case of only datetime.date objects, we also don't infer it as datetime dtype.
Comment From: jbrockmendel
if I would have to choose, I prefer the Index behaviour
agreed
Comment From: jreback
ok i'll agree with you folks here.