We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5db56df commit 74f4b8bCopy full SHA for 74f4b8b
pandas/core/common.py
@@ -84,7 +84,7 @@ def maybe_box(indexer, values, obj, key):
84
def maybe_box_datetimelike(value):
85
# turn a datetime like into a Timestamp/timedelta as needed
86
87
- if isinstance(value, (np.datetime64, datetime)):
+ if isinstance(value, (np.datetime64, datetime)) and not isinstance(value, tslibs.Timestamp):
88
value = tslibs.Timestamp(value)
89
elif isinstance(value, (np.timedelta64, timedelta)):
90
value = tslibs.Timedelta(value)
0 commit comments