Skip to content

DOC: Enforce Numpy Docstring Validation for pandas.Series #58537

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 6 commits into from
May 3, 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
3 changes: 1 addition & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.RangeIndex.start SA01" \
-i "pandas.RangeIndex.step SA01" \
-i "pandas.RangeIndex.stop SA01" \
-i "pandas.Series.__iter__ RT03,SA01" \
-i "pandas.Series.add PR07" \
-i "pandas.Series.case_when RT03" \
-i "pandas.Series.cat PR07,SA01" \
-i "pandas.Series.cat PR07" \
-i "pandas.Series.cat.add_categories PR01,PR02" \
-i "pandas.Series.cat.as_ordered PR01" \
-i "pandas.Series.cat.as_unordered PR01" \
Expand Down
7 changes: 6 additions & 1 deletion pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ def add_categories(self, new_categories) -> Self:
Parameters
----------
new_categories : category or list-like of category
The new categories to be included.
The new categories to be included.

Returns
-------
Expand Down Expand Up @@ -2864,6 +2864,11 @@ class CategoricalAccessor(PandasDelegate, PandasObject, NoNewAttributesMixin):
----------
data : Series or CategoricalIndex

See Also
--------
Series.dt : Accessor object for datetimelike properties of the Series values.
Series.sparse : Accessor for sparse matrix data types.

Examples
--------
>>> s = pd.Series(list("abbccc")).astype("category")
Expand Down
5 changes: 5 additions & 0 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@ def __iter__(self) -> Iterator:
Returns
-------
iterator
An iterator yielding scalar values from the Series.

See Also
--------
Series.items : Lazily iterate over (index, value) tuples.

Examples
--------
Expand Down