diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 6178d0b2a5307..f27dbeaf35915 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -89,12 +89,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DataFrame.to_sql \ pandas.read_stata \ pandas.plotting.scatter_matrix \ - pandas.Index.rename \ pandas.Index.droplevel \ - pandas.Index.isin \ pandas.MultiIndex.names \ pandas.MultiIndex.droplevel \ - pandas.IndexSlice \ pandas.Grouper \ pandas.io.formats.style.Styler.map \ pandas.io.formats.style.Styler.apply_index \ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index c3775961cedb8..bdd6392387ae8 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1953,7 +1953,7 @@ def rename(self, name, inplace: bool = False) -> Self | None: >>> idx = pd.MultiIndex.from_product([['python', 'cobra'], ... [2018, 2019]], - ... names=['kind', 'year']) + ... names=['kind', 'year']) >>> idx MultiIndex([('python', 2018), ('python', 2019), @@ -6575,7 +6575,7 @@ def isin(self, values, level=None) -> npt.NDArray[np.bool_]: Examples -------- - >>> idx = pd.Index([1,2,3]) + >>> idx = pd.Index([1, 2, 3]) >>> idx Index([1, 2, 3], dtype='int64') @@ -6584,7 +6584,7 @@ def isin(self, values, level=None) -> npt.NDArray[np.bool_]: >>> idx.isin([1, 4]) array([ True, False, False]) - >>> midx = pd.MultiIndex.from_arrays([[1,2,3], + >>> midx = pd.MultiIndex.from_arrays([[1, 2, 3], ... ['red', 'blue', 'green']], ... names=('number', 'color')) >>> midx diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index 0f892d4924933..2e7a237406ca5 100644 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -121,7 +121,7 @@ class _IndexSlice: Examples -------- - >>> midx = pd.MultiIndex.from_product([['A0','A1'], ['B0','B1','B2','B3']]) + >>> midx = pd.MultiIndex.from_product([['A0', 'A1'], ['B0', 'B1', 'B2', 'B3']]) >>> columns = ['foo', 'bar'] >>> dfmi = pd.DataFrame(np.arange(16).reshape((len(midx), len(columns))), ... index=midx, columns=columns)