Skip to content

Commit 9a92fb4

Browse files
committed
Update nattype.pyx to match updated docstrings
1 parent 6b90771 commit 9a92fb4

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

pandas/_libs/tslibs/nattype.pyx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,23 @@ class NaTType(_NaT):
595595
utctimetuple = _make_error_func(
596596
"utctimetuple",
597597
"""
598-
Return UTC time tuple, compatible with time.localtime().
598+
Return UTC time tuple, compatible with `time.localtime()`.
599+
600+
This method converts the Timestamp to UTC and returns a time tuple
601+
containing 9 components: year, month, day, hour, minute, second,
602+
weekday, day of year, and DST flag. This is particularly useful for
603+
converting a Timestamp to a format compatible with time module functions.
604+
605+
Returns
606+
-------
607+
time.struct_time
608+
A time.struct_time object representing the UTC time.
609+
610+
See Also
611+
--------
612+
datetime.datetime.utctimetuple : Return UTC time tuple, compatible with time.localtime().
613+
Timestamp.timetuple : Return time tuple of local time.
614+
time.struct_time : Time tuple structure used by time functions.
599615
600616
Examples
601617
--------
@@ -612,6 +628,21 @@ class NaTType(_NaT):
612628
"""
613629
Return utc offset.
614630
631+
This method returns the difference between UTC and the local time
632+
as a `timedelta` object. It is useful for understanding the time
633+
difference between the current timezone and UTC.
634+
635+
Returns
636+
--------
637+
timedelta
638+
The difference between UTC and the local time as a `timedelta` object.
639+
640+
See Also
641+
--------
642+
datetime.datetime.utcoffset : Standard library method to get the UTC offset of a datetime object.
643+
Timestamp.tzname : Return the name of the timezone.
644+
Timestamp.dst : Return the daylight saving time (DST) adjustment.
645+
615646
Examples
616647
--------
617648
>>> ts = pd.Timestamp('2023-01-01 10:00:00', tz='Europe/Brussels')

0 commit comments

Comments
 (0)