@@ -252,7 +252,23 @@ cdef class _Timestamp(ABCTimestamp):
252
252
@property
253
253
def unit(self ) -> str:
254
254
"""
255
- The abbreviation associated with self._creso.
255
+ The abbreviation associated with the Timestamp's resolution.
256
+
257
+ This property returns a string representing the time unit of the Timestamp's
258
+ resolution. It corresponds to the smallest time unit that can be represented
259
+ by this Timestamp object. The possible values are 's' (second ), 'ms' (millisecond ),
260
+ 'us' (microsecond ), and 'ns' (nanosecond ).
261
+
262
+ Returns
263
+ -------
264
+ str
265
+ A string abbreviation of the Timestamp's resolution unit:
266
+ 's' for second , 'ms' for millisecond , 'us' for microsecond , or 'ns' for nanosecond.
267
+
268
+ See Also
269
+ --------
270
+ Timestamp.resolution : Return resolution of the Timestamp.
271
+ pandas.Timedelta : A duration expressing the difference between two dates or times.
256
272
257
273
Examples
258
274
--------
@@ -1754,7 +1770,14 @@ class Timestamp(_Timestamp):
1754
1770
1755
1771
Returns
1756
1772
--------
1757
- 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.
1758
1781
1759
1782
Examples
1760
1783
--------
@@ -1770,6 +1793,22 @@ class Timestamp(_Timestamp):
1770
1793
"""
1771
1794
Return UTC time tuple, compatible with time.localtime().
1772
1795
1796
+ This method converts the Timestamp to UTC and returns a time tuple
1797
+ containing 9 components: year, month, day, hour, minute, second,
1798
+ weekday, day of year, and DST flag. This is particularly useful for
1799
+ converting a Timestamp to a format compatible with time module functions.
1800
+
1801
+ Returns
1802
+ -------
1803
+ time.struct_time
1804
+ A time.struct_time object representing the UTC time.
1805
+
1806
+ See Also
1807
+ --------
1808
+ datetime.datetime.utctimetuple : Return UTC time tuple, compatible with time.localtime().
1809
+ Timestamp.timetuple : Return time tuple of local time.
1810
+ time.struct_time : Time tuple structure used by time functions.
1811
+
1773
1812
Examples
1774
1813
--------
1775
1814
>>> ts = pd.Timestamp('2023-01-01 10:00:00', tz='Europe/Brussels')
0 commit comments