Skip to content

Commit 130d28c

Browse files
committed
Update Docstrings for unit, utcoffset, utctimetuple
Use old unit one-line description Remove pandas prefix from See Also due to SA05
1 parent 13a7e14 commit 130d28c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,14 @@ class Timestamp(_Timestamp):
17701770
17711771
Returns
17721772
--------
1773-
timedelta : The difference between UTC and the local time as a `timedelta` object.
1773+
timedelta
1774+
The difference between UTC and the local time as a `timedelta` object.
1775+
1776+
See Also
1777+
--------
1778+
datetime.datetime.utcoffset : Standard library method to get the UTC offset of a datetime object.
1779+
Timestamp.tzname : Return the name of the timezone.
1780+
Timestamp.dst : Return the daylight saving time (DST) adjustment.
17741781
17751782
This method returns the difference between UTC and the local time
17761783
as a `timedelta` object. It is useful for understanding the time
@@ -1817,6 +1824,22 @@ class Timestamp(_Timestamp):
18171824
Timestamp.timetuple : Return time tuple of local time.
18181825
time.struct_time : Time tuple structure used by time functions.
18191826
1827+
This method converts the Timestamp to UTC and returns a time tuple
1828+
containing 9 components: year, month, day, hour, minute, second,
1829+
weekday, day of year, and DST flag. This is particularly useful for
1830+
converting a Timestamp to a format compatible with time module functions.
1831+
1832+
Returns
1833+
-------
1834+
time.struct_time
1835+
A time.struct_time object representing the UTC time.
1836+
1837+
See Also
1838+
--------
1839+
datetime.datetime.utctimetuple : Return UTC time tuple, compatible with time.localtime().
1840+
Timestamp.timetuple : Return time tuple of local time.
1841+
time.struct_time : Time tuple structure used by time functions.
1842+
18201843
Examples
18211844
--------
18221845
>>> ts = pd.Timestamp('2023-01-01 10:00:00', tz='Europe/Brussels')

0 commit comments

Comments
 (0)