-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Closed
Copy link
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorBugConstructorsSeries/DataFrame/Index/pd.array ConstructorsSeries/DataFrame/Index/pd.array ConstructorsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member
Description
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.
Metadata
Metadata
Assignees
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorBugConstructorsSeries/DataFrame/Index/pd.array ConstructorsSeries/DataFrame/Index/pd.array ConstructorsNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member