Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pandas/core/tools/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,9 @@ def to_datetime(
If parsing succeeded.
Return type depends on input:

- list-like: DatetimeIndex
- list-like:
- DatetimeIndex, if timezone naive or aware with the same timezone
Copy link
Contributor

@smarie smarie Jun 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in #42229 (comment)

Suggested change
- DatetimeIndex, if timezone naive or aware with the same timezone
- DatetimeIndex, if timezone naive or aware with the same time offset

- Index of object dtype, if timezone aware with mixed timezones
- Series: Series of datetime64 dtype
- scalar: Timestamp

Expand Down