Skip to content

Improved docstring and return type hints for to_datetime #42494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jan 5, 2022
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bd4061c
Update datetimes.py
smarie Jul 12, 2021
66c725d
from code review: improved utc doc
Oct 4, 2021
74f6aa2
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
Oct 4, 2021
f5cbef8
Improved overall readability by
Oct 5, 2021
866bdcb
minor improvement
Oct 5, 2021
cd3ec35
Minor fix and improvement again
Oct 5, 2021
1be053a
Changed order of output description to match the global section doc
Oct 5, 2021
41a1e53
Removed the "type: ignore" since the return type hints are now fixed
Oct 5, 2021
95cfc54
Removed type hint-related mods (will move to a separate pr)
Oct 8, 2021
6569b1e
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
Oct 8, 2021
8ebd77e
Removed backslash characters from doctests as per code review
Oct 11, 2021
8baf7bf
As per code review: replaced all "tz-" with "timezone-"
Oct 11, 2021
bc26945
Code review: capitalized if
Oct 11, 2021
83ef850
Compressed output description as per code review.
Oct 28, 2021
0b21772
Moved the general summary to a notes section
Oct 28, 2021
83ddfe7
Update pandas/core/tools/datetimes.py
smarie Oct 28, 2021
8e1ebf0
As per code review: reduced the utc param description and added struc…
Dec 17, 2021
d8cbe8a
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
Dec 17, 2021
5310779
Minor edits
Dec 17, 2021
2b22544
Changed as per code review
Dec 17, 2021
2b63ea7
Changed as per code review
Dec 18, 2021
70a7c8f
what's new attempt
Dec 18, 2021
7739e12
Revert "what's new attempt"
Jan 3, 2022
4e87e39
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
Jan 3, 2022
de9fe69
Merge branch 'master' of https://github.com/pandas-dev/pandas into pa…
Jan 4, 2022
5f4dbb8
Changed as per code review: added sphinx directives wherever possible…
Jan 4, 2022
a2fb1a1
Changed as per code review: added const role
Jan 4, 2022
04312bd
sphinx role
Jan 4, 2022
514b0c4
Changed as per code review: sphinx roles
Jan 4, 2022
fc2395d
minor change again
Jan 4, 2022
e0cf329
Last polishing round: sphinx roles and a few fixes
Jan 4, 2022
1421830
Fixed typo
Jan 4, 2022
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
2 changes: 1 addition & 1 deletion pandas/core/tools/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ def to_datetime(
Return type depends on input:

- list-like:
- DatetimeIndex, if timezone naive or aware with the same timezone
- DatetimeIndex, if timezone naive or aware with constant time offset
- Index of object dtype, if timezone aware with mixed time offsets
- Series: Series of datetime64 dtype
- scalar: Timestamp
Expand Down