Skip to content

Commit 31067af

Browse files
DOC: add SA01 for pandas.Timestamp.time
1 parent f2eeb4e commit 31067af

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
250250
-i "pandas.Timestamp.resolution PR02" \
251251
-i "pandas.Timestamp.second GL08" \
252252
-i "pandas.Timestamp.strptime PR01,SA01" \
253-
-i "pandas.Timestamp.time SA01" \
254253
-i "pandas.Timestamp.timestamp SA01" \
255254
-i "pandas.Timestamp.timetuple SA01" \
256255
-i "pandas.Timestamp.timetz SA01" \

pandas/_libs/tslibs/nattype.pyx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,16 @@ class NaTType(_NaT):
633633
"""
634634
Return time object with same time but with tzinfo=None.
635635
636+
This method extracts the time part of the `Timestamp` object, excluding any
637+
timezone information. It returns a `datetime.time` object which only represents
638+
the time (hours, minutes, seconds, and microseconds).
639+
640+
See Also
641+
--------
642+
Timestamp.date : Return date object with same year, month and day.
643+
Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone.
644+
Timestamp.tz_localize : Localize the Timestamp to a timezone.
645+
636646
Examples
637647
--------
638648
>>> ts = pd.Timestamp('2023-01-01 10:00:00')

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,16 @@ class Timestamp(_Timestamp):
17681768
"""
17691769
Return time object with same time but with tzinfo=None.
17701770
1771+
This method extracts the time part of the `Timestamp` object, excluding any
1772+
timezone information. It returns a `datetime.time` object which only represents
1773+
the time (hours, minutes, seconds, and microseconds).
1774+
1775+
See Also
1776+
--------
1777+
Timestamp.date : Return date object with same year, month and day.
1778+
Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone.
1779+
Timestamp.tz_localize : Localize the Timestamp to a timezone.
1780+
17711781
Examples
17721782
--------
17731783
>>> ts = pd.Timestamp('2023-01-01 10:00:00')

0 commit comments

Comments
 (0)