Skip to content

Commit 68bd273

Browse files
prabha-gitsmarie
andauthored
Updated the return type section of to_datetime (#42244)
* Updated the return type section of to_datetime to include list-like mixed timezone inputs * updated the Returns section * updated the Return section as suggested by mroeschke * removed the extra line in my previous commit * Update pandas/core/tools/datetimes.py Co-authored-by: Sylvain Marié <[email protected]> Co-authored-by: Sylvain Marié <[email protected]>
1 parent c8b3337 commit 68bd273

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/tools/datetimes.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,9 @@ def to_datetime(
762762
If parsing succeeded.
763763
Return type depends on input:
764764
765-
- list-like: DatetimeIndex
765+
- list-like:
766+
- DatetimeIndex, if timezone naive or aware with the same timezone
767+
- Index of object dtype, if timezone aware with mixed time offsets
766768
- Series: Series of datetime64 dtype
767769
- scalar: Timestamp
768770

0 commit comments

Comments
 (0)