From e007cc2114a8e56fe5e1bb9cf44d0216ea0086ec Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Fri, 17 May 2024 19:16:20 +0530 Subject: [PATCH 1/2] DOC: add SA01 ES01 for pandas.Series.dt.components --- pandas/core/indexes/accessors.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandas/core/indexes/accessors.py b/pandas/core/indexes/accessors.py index 3dcd1fedc8d64..3cb51f7447677 100644 --- a/pandas/core/indexes/accessors.py +++ b/pandas/core/indexes/accessors.py @@ -489,10 +489,20 @@ def components(self) -> DataFrame: """ Return a Dataframe of the components of the Timedeltas. + Each row of the DataFrame corresponds to a Timedelta in the original + Series and contains the individual components (days, hours, minutes, + seconds, milliseconds, microseconds, nanoseconds) of the Timedelta. + Returns ------- DataFrame + See Also + -------- + TimedeltaIndex.components : Return a DataFrame of the individual resolution + components of the Timedeltas. + Series.dt.total_seconds : Return the total number of seconds in the duration. + Examples -------- >>> s = pd.Series(pd.to_timedelta(np.arange(5), unit="s")) From 93b043a7ea4d50d362437fa73d94b7f536305564 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Fri, 17 May 2024 19:16:35 +0530 Subject: [PATCH 2/2] DOC: remove SA01 ES01 for pandas.Series.dt.components --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 4bea3a462db07..a194c340c63a5 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -148,7 +148,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.cat.set_categories PR01,PR02" \ -i "pandas.Series.dt.as_unit PR01,PR02" \ -i "pandas.Series.dt.ceil PR01,PR02" \ - -i "pandas.Series.dt.components SA01" \ -i "pandas.Series.dt.day_name PR01,PR02" \ -i "pandas.Series.dt.floor PR01,PR02" \ -i "pandas.Series.dt.freq GL08" \