diff --git a/ci/code_checks.sh b/ci/code_checks.sh index fbd71af9b60de..211af5999c975 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -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" \ @@ -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" \ @@ -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" \ @@ -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" \ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 028492f5617bd..6632fba43dc8a 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -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( @@ -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 @@ -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: diff --git a/pandas/core/series.py b/pandas/core/series.py index 8b36bd0f381c5..a72eb8e261e65 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -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])