Skip to content

Commit 9702090

Browse files
Merge remote-tracking branch 'upstream/main' into pandas.Timedelta.total_seconds
2 parents 01b0899 + e3bcd10 commit 9702090

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7272
-i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \
7373
-i "pandas.Period.freq GL08" \
7474
-i "pandas.Period.ordinal GL08" \
75-
-i "pandas.PeriodDtype.freq SA01" \
7675
-i "pandas.RangeIndex.from_range PR01,SA01" \
7776
-i "pandas.RangeIndex.step SA01" \
7877
-i "pandas.Series.cat.add_categories PR01,PR02" \
@@ -102,7 +101,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
102101
-i "pandas.Series.sparse.from_coo PR07,SA01" \
103102
-i "pandas.Series.sparse.npoints SA01" \
104103
-i "pandas.Series.sparse.sp_values SA01" \
105-
-i "pandas.Timedelta.components SA01" \
106104
-i "pandas.Timedelta.max PR02" \
107105
-i "pandas.Timedelta.min PR02" \
108106
-i "pandas.Timedelta.resolution PR02" \

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,17 @@ cdef class _Timedelta(timedelta):
15011501
"""
15021502
Return a components namedtuple-like.
15031503
1504+
Each component represents a different time unit, allowing you to access the
1505+
breakdown of the total duration in terms of days, hours, minutes, seconds,
1506+
milliseconds, microseconds, and nanoseconds.
1507+
1508+
See Also
1509+
--------
1510+
Timedelta.total_seconds : Returns the total duration of the Timedelta in
1511+
seconds.
1512+
to_timedelta : Convert argument to Timedelta.
1513+
Timedelta : Represents a duration, the difference between two dates or times.
1514+
15041515
Examples
15051516
--------
15061517
>>> td = pd.Timedelta('2 day 4 min 3 us 42 ns')

pandas/core/arrays/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,6 @@ def interpolate(
10101010
* 'time': Works on daily and higher resolution data to interpolate
10111011
given length of interval.
10121012
* 'index', 'values': use the actual numerical values of the index.
1013-
* 'pad': Fill in NaNs using existing values.
10141013
* 'nearest', 'zero', 'slinear', 'quadratic', 'cubic', 'barycentric',
10151014
'polynomial': Passed to scipy.interpolate.interp1d, whereas 'spline'
10161015
is passed to scipy.interpolate.UnivariateSpline. These methods use

pandas/core/dtypes/dtypes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,20 @@ def freq(self) -> BaseOffset:
10651065
"""
10661066
The frequency object of this PeriodDtype.
10671067
1068+
The `freq` property returns the `BaseOffset` object that represents the
1069+
frequency of the PeriodDtype. This frequency specifies the interval (e.g.,
1070+
daily, monthly, yearly) associated with the Period type. It is essential
1071+
for operations that depend on time-based calculations within a period index
1072+
or series.
1073+
1074+
See Also
1075+
--------
1076+
Period : Represents a period of time.
1077+
PeriodIndex : Immutable ndarray holding ordinal values indicating
1078+
regular periods.
1079+
PeriodDtype : An ExtensionDtype for Period data.
1080+
date_range : Return a fixed frequency range of dates.
1081+
10681082
Examples
10691083
--------
10701084
>>> dtype = pd.PeriodDtype(freq="D")

0 commit comments

Comments
 (0)