From b24972a20730088b6e7620f79f1900eedb0869bd Mon Sep 17 00:00:00 2001 From: KeiOshima Date: Sun, 21 Apr 2024 14:23:03 -0400 Subject: [PATCH] Doc: Fixinf SA01 error for DataFrame: pop and columns --- ci/code_checks.sh | 2 -- pandas/core/frame.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index ad12458ad6b0d..35a5c7fed1d9a 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -82,7 +82,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DataFrame.__dataframe__ SA01" \ -i "pandas.DataFrame.__iter__ SA01" \ -i "pandas.DataFrame.at_time PR01" \ - -i "pandas.DataFrame.columns SA01" \ -i "pandas.DataFrame.droplevel SA01" \ -i "pandas.DataFrame.hist RT03" \ -i "pandas.DataFrame.infer_objects RT03" \ @@ -93,7 +92,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DataFrame.median RT03,SA01" \ -i "pandas.DataFrame.min RT03" \ -i "pandas.DataFrame.plot PR02,SA01" \ - -i "pandas.DataFrame.pop SA01" \ -i "pandas.DataFrame.prod RT03" \ -i "pandas.DataFrame.product RT03" \ -i "pandas.DataFrame.reorder_levels SA01" \ diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 0185ca8241617..cab7389b5c000 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -5535,6 +5535,11 @@ def pop(self, item: Hashable) -> Series: Series Series representing the item that is dropped. + See Also + -------- + DataFrame.drop: Drop specified labels from rows or columns. + DataFrame.drop_duplicates: Return DataFrame with duplicate rows removed. + Examples -------- >>> df = pd.DataFrame( @@ -12893,6 +12898,11 @@ def isin_(x): """ The column labels of the DataFrame. + See Also + -------- + DataFrame.index: The index (row labels) of the DataFrame. + DataFrame.axes: Return a list representing the axes of the DataFrame. + Examples -------- >>> df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})