Skip to content

DOC: Fix Docstring Validation for pandas.Series.str.translate #58699

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 13, 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 @@ -229,7 +229,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.str.strip RT03" \
-i "pandas.Series.str.swapcase RT03" \
-i "pandas.Series.str.title RT03" \
-i "pandas.Series.str.translate RT03,SA01" \
-i "pandas.Series.str.upper RT03" \
-i "pandas.Series.str.wrap RT03,SA01" \
-i "pandas.Series.str.zfill RT03" \
Expand Down
14 changes: 13 additions & 1 deletion pandas/core/strings/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,11 @@ def translate(self, table):
"""
Map all characters in the string through the given mapping table.

Equivalent to standard :meth:`str.translate`.
This method is equivalent to the standard :meth:`str.translate`
method for strings. It maps each character in the string to a new
character according to the translation table provided. Unmapped
characters are left unchanged, while characters mapped to None
are removed.

Parameters
----------
Expand All @@ -2421,6 +2425,14 @@ def translate(self, table):
Returns
-------
Series or Index
A new Series or Index with translated strings.

See Also
--------
Series.str.replace : Replace occurrences of pattern/regex in the
Series with some other string.
Index.str.replace : Replace occurrences of pattern/regex in the
Index with some other string.

Examples
--------
Expand Down
Loading