Skip to content

DOC: Add SA01 ES01 for pandas.Series.dt.components #58751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/indexes/accessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
Loading