File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
113
113
-i " pandas.Timedelta.resolution PR02" \
114
114
-i " pandas.Timedelta.to_timedelta64 SA01" \
115
115
-i " pandas.Timedelta.total_seconds SA01" \
116
- -i " pandas.Timedelta.view SA01" \
117
116
-i " pandas.TimedeltaIndex.nanoseconds SA01" \
118
117
-i " pandas.TimedeltaIndex.seconds SA01" \
119
118
-i " pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \
Original file line number Diff line number Diff line change @@ -1458,11 +1458,26 @@ cdef class _Timedelta(timedelta):
1458
1458
"""
1459
1459
Array view compatibility.
1460
1460
1461
+ This method allows you to reinterpret the underlying data of a Timedelta
1462
+ object as a different dtype. The `view` method provides a way to reinterpret
1463
+ the internal representation of the `Timedelta` object without modifying its
1464
+ data. This is particularly useful when you need to work with the underlying
1465
+ data directly, such as for performance optimizations or interfacing with
1466
+ low-level APIs. The returned value is typically the number of nanoseconds
1467
+ since the epoch, represented as an integer or another specified dtype.
1468
+
1461
1469
Parameters
1462
1470
----------
1463
1471
dtype : str or dtype
1464
1472
The dtype to view the underlying data as.
1465
1473
1474
+ See Also
1475
+ --------
1476
+ numpy.ndarray.view : Returns a view of an array with the same data.
1477
+ Timedelta.to_numpy : Converts the Timedelta to a NumPy timedelta64.
1478
+ Timedelta.total_seconds : Returns the total duration of the Timedelta
1479
+ object in seconds.
1480
+
1466
1481
Examples
1467
1482
--------
1468
1483
>>> td = pd.Timedelta('3D')
You can’t perform that action at this time.
0 commit comments