Skip to content

DOC: add SA01 for pandas.Timestamp.time #59169

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 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.second GL08" \
-i "pandas.Timestamp.strptime PR01,SA01" \
-i "pandas.Timestamp.time SA01" \
-i "pandas.Timestamp.timestamp SA01" \
-i "pandas.Timestamp.timetuple SA01" \
-i "pandas.Timestamp.timetz SA01" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/_libs/tslibs/nattype.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,16 @@ class NaTType(_NaT):
"""
Return time object with same time but with tzinfo=None.

This method extracts the time part of the `Timestamp` object, excluding any
timezone information. It returns a `datetime.time` object which only represents
the time (hours, minutes, seconds, and microseconds).

See Also
--------
Timestamp.date : Return date object with same year, month and day.
Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone.
Timestamp.tz_localize : Localize the Timestamp to a timezone.

Examples
--------
>>> ts = pd.Timestamp('2023-01-01 10:00:00')
Expand Down
10 changes: 10 additions & 0 deletions pandas/_libs/tslibs/timestamps.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,16 @@ class Timestamp(_Timestamp):
"""
Return time object with same time but with tzinfo=None.

This method extracts the time part of the `Timestamp` object, excluding any
timezone information. It returns a `datetime.time` object which only represents
the time (hours, minutes, seconds, and microseconds).

See Also
--------
Timestamp.date : Return date object with same year, month and day.
Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone.
Timestamp.tz_localize : Localize the Timestamp to a timezone.

Examples
--------
>>> ts = pd.Timestamp('2023-01-01 10:00:00')
Expand Down
Loading