Skip to content

Commit faad5ab

Browse files
DOC: add SA01 for pandas.Timestamp.time (pandas-dev#59169)
1 parent 69fe98d commit faad5ab

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
249249
-i "pandas.Timestamp.resolution PR02" \
250250
-i "pandas.Timestamp.second GL08" \
251251
-i "pandas.Timestamp.strptime PR01,SA01" \
252-
-i "pandas.Timestamp.time SA01" \
253252
-i "pandas.Timestamp.timestamp SA01" \
254253
-i "pandas.Timestamp.timetuple SA01" \
255254
-i "pandas.Timestamp.timetz SA01" \

pandas/_libs/tslibs/nattype.pyx

+10
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

+10
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,16 @@ class Timestamp(_Timestamp):
17781778
"""
17791779
Return time object with same time but with tzinfo=None.
17801780
1781+
This method extracts the time part of the `Timestamp` object, excluding any
1782+
timezone information. It returns a `datetime.time` object which only represents
1783+
the time (hours, minutes, seconds, and microseconds).
1784+
1785+
See Also
1786+
--------
1787+
Timestamp.date : Return date object with same year, month and day.
1788+
Timestamp.tz_convert : Convert timezone-aware Timestamp to another time zone.
1789+
Timestamp.tz_localize : Localize the Timestamp to a timezone.
1790+
17811791
Examples
17821792
--------
17831793
>>> ts = pd.Timestamp('2023-01-01 10:00:00')

0 commit comments

Comments
 (0)