diff --git a/ci/code_checks.sh b/ci/code_checks.sh index f27dbeaf35915..190af8115fdc2 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -83,16 +83,9 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.Timestamp.floor \ pandas.Timestamp.round \ pandas.read_json \ - pandas.io.json.build_table_schema \ pandas.io.formats.style.Styler.to_latex \ pandas.read_parquet \ pandas.DataFrame.to_sql \ - pandas.read_stata \ - pandas.plotting.scatter_matrix \ - pandas.Index.droplevel \ - pandas.MultiIndex.names \ - pandas.MultiIndex.droplevel \ - pandas.Grouper \ pandas.io.formats.style.Styler.map \ pandas.io.formats.style.Styler.apply_index \ pandas.io.formats.style.Styler.map_index \ diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py index e68c393f8f707..a93cf33590c3e 100644 --- a/pandas/core/groupby/grouper.py +++ b/pandas/core/groupby/grouper.py @@ -151,8 +151,8 @@ class Grouper: Specify a resample operation on the column 'Publish date' >>> df = pd.DataFrame( - ... { - ... "Publish date": [ + ... { + ... "Publish date": [ ... pd.Timestamp("2000-01-02"), ... pd.Timestamp("2000-01-02"), ... pd.Timestamp("2000-01-09"), diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index bdd6392387ae8..a2666cd6cb229 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2124,7 +2124,7 @@ def droplevel(self, level: IndexLabel = 0): Examples -------- >>> mi = pd.MultiIndex.from_arrays( - ... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z']) + ... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z']) >>> mi MultiIndex([(1, 3, 5), (2, 4, 6)], diff --git a/pandas/io/json/_table_schema.py b/pandas/io/json/_table_schema.py index 4d9fba72cf173..c279eeea78c6b 100644 --- a/pandas/io/json/_table_schema.py +++ b/pandas/io/json/_table_schema.py @@ -277,7 +277,7 @@ def build_table_schema( ... {'A': [1, 2, 3], ... 'B': ['a', 'b', 'c'], ... 'C': pd.date_range('2016-01-01', freq='d', periods=3), - ... }, index=pd.Index(range(3), name='idx')) + ... }, index=pd.Index(range(3), name='idx')) >>> build_table_schema(df) {'fields': \ [{'name': 'idx', 'type': 'integer'}, \ diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 4abf9af185a01..576e27f202524 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -176,7 +176,7 @@ Creating a dummy stata for this example >>> df = pd.DataFrame({{'animal': ['falcon', 'parrot', 'falcon', 'parrot'], -... 'speed': [350, 18, 361, 15]}}) # doctest: +SKIP +... 'speed': [350, 18, 361, 15]}}) # doctest: +SKIP >>> df.to_stata('animals.dta') # doctest: +SKIP Read a Stata dta file: @@ -189,7 +189,7 @@ >>> df = pd.DataFrame(values, columns=["i"]) # doctest: +SKIP >>> df.to_stata('filename.dta') # doctest: +SKIP ->>> with pd.read_stata('filename.dta', chunksize=10000) as itr: # doctest: +SKIP +>>> with pd.read_stata('filename.dta', chunksize=10000) as itr: # doctest: +SKIP >>> for chunk in itr: ... # Operate on a single chunk, e.g., chunk.mean() ... pass # doctest: +SKIP diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 18db460d388a4..c8c8f68f5289e 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -204,7 +204,7 @@ def scatter_matrix( .. plot:: :context: close-figs - >>> df = pd.DataFrame(np.random.randn(1000, 4), columns=['A','B','C','D']) + >>> df = pd.DataFrame(np.random.randn(1000, 4), columns=['A', 'B', 'C', 'D']) >>> pd.plotting.scatter_matrix(df, alpha=0.2) array([[, , , ],