Skip to content

DOC: Remove deprecated methods w/ SA01 errors from code_checks.sh #58298

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 9 commits into from
Apr 18, 2024
8 changes: 0 additions & 8 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.DataFrame.__iter__ SA01" \
-i "pandas.DataFrame.at_time PR01" \
-i "pandas.DataFrame.columns SA01" \
-i "pandas.DataFrame.copy SA01" \
-i "pandas.DataFrame.droplevel SA01" \
-i "pandas.DataFrame.first_valid_index SA01" \
-i "pandas.DataFrame.hist RT03" \
-i "pandas.DataFrame.infer_objects RT03" \
-i "pandas.DataFrame.keys SA01" \
-i "pandas.DataFrame.kurt RT03,SA01" \
-i "pandas.DataFrame.kurtosis RT03,SA01" \
-i "pandas.DataFrame.last_valid_index SA01" \
-i "pandas.DataFrame.max RT03" \
-i "pandas.DataFrame.mean RT03,SA01" \
-i "pandas.DataFrame.median RT03,SA01" \
Expand Down Expand Up @@ -310,7 +306,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.cat.rename_categories PR01,PR02" \
-i "pandas.Series.cat.reorder_categories PR01,PR02" \
-i "pandas.Series.cat.set_categories PR01,PR02" \
-i "pandas.Series.copy SA01" \
-i "pandas.Series.div PR07" \
-i "pandas.Series.droplevel SA01" \
-i "pandas.Series.dt.as_unit PR01,PR02" \
Expand Down Expand Up @@ -354,7 +349,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.dtype SA01" \
-i "pandas.Series.empty GL08" \
-i "pandas.Series.eq PR07,SA01" \
-i "pandas.Series.first_valid_index SA01" \
-i "pandas.Series.floordiv PR07" \
-i "pandas.Series.ge PR07,SA01" \
-i "pandas.Series.gt PR07,SA01" \
Expand All @@ -364,10 +358,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.is_monotonic_increasing SA01" \
-i "pandas.Series.is_unique SA01" \
-i "pandas.Series.item SA01" \
-i "pandas.Series.keys SA01" \
-i "pandas.Series.kurt RT03,SA01" \
-i "pandas.Series.kurtosis RT03,SA01" \
-i "pandas.Series.last_valid_index SA01" \
-i "pandas.Series.le PR07,SA01" \
-i "pandas.Series.list.__getitem__ SA01" \
-i "pandas.Series.list.flatten SA01" \
Expand Down
18 changes: 18 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,11 @@ def keys(self) -> Index:
Index
Info axis.

See Also
--------
DataFrame.index : The index (row labels) of the DataFrame.
DataFrame.columns: The column labels of the DataFrame.

Examples
--------
>>> d = pd.DataFrame(
Expand Down Expand Up @@ -6392,6 +6397,11 @@ def copy(self, deep: bool = True) -> Self:
Series or DataFrame
Object type matches caller.

See Also
--------
copy.copy : Return a shallow copy of an object.
copy.deepcopy : Return a deep copy of an object.

Notes
-----
When ``deep=True``, data is copied but actual Python objects
Expand Down Expand Up @@ -11616,6 +11626,14 @@ def first_valid_index(self) -> Hashable:
type of index
Index of {position} non-missing value.

See Also
--------
DataFrame.last_valid_index : Return index for last non-NA value or None, if
no non-NA value is found.
Series.last_valid_index : Return index for last non-NA value or None, if no
non-NA value is found.
DataFrame.isna : Detect missing values.

Examples
--------
For Series:
Expand Down
4 changes: 4 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,10 @@ def keys(self) -> Index:
Index
Index of the Series.

See Also
--------
Series.index : The index (axis labels) of the Series.

Examples
--------
>>> s = pd.Series([1, 2, 3], index=[0, 1, 2])
Expand Down