diff --git a/ci/code_checks.sh b/ci/code_checks.sh index d342a588bc897..2c3cc29bd8c0c 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -591,14 +591,11 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.api.types.is_timedelta64_ns_dtype \ pandas.api.types.is_unsigned_integer_dtype \ pandas.core.groupby.DataFrameGroupBy.take \ - pandas.core.groupby.SeriesGroupBy.take \ pandas.io.formats.style.Styler.concat \ pandas.io.formats.style.Styler.export \ pandas.io.formats.style.Styler.set_td_classes \ pandas.io.formats.style.Styler.use \ pandas.io.json.build_table_schema \ - pandas.merge_ordered \ - pandas.option_context \ pandas.plotting.andrews_curves \ pandas.plotting.autocorrelation_plot \ pandas.plotting.lag_plot \ diff --git a/pandas/_config/config.py b/pandas/_config/config.py index 5e7cb9f9091ad..4d87e8dca6d16 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -424,6 +424,7 @@ class option_context(ContextDecorator): Examples -------- + >>> from pandas import option_context >>> with option_context('display.max_rows', 10, 'display.max_columns', 5): ... pass """ diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py index 799d9cf350513..3a9ffc8631441 100644 --- a/pandas/core/groupby/generic.py +++ b/pandas/core/groupby/generic.py @@ -933,7 +933,7 @@ def take( Examples -------- - >>> df = DataFrame([('falcon', 'bird', 389.0), + >>> df = pd.DataFrame([('falcon', 'bird', 389.0), ... ('parrot', 'bird', 24.0), ... ('lion', 'mammal', 80.5), ... ('monkey', 'mammal', np.nan), @@ -2358,7 +2358,7 @@ def take( Examples -------- - >>> df = DataFrame([('falcon', 'bird', 389.0), + >>> df = pd.DataFrame([('falcon', 'bird', 389.0), ... ('parrot', 'bird', 24.0), ... ('lion', 'mammal', 80.5), ... ('monkey', 'mammal', np.nan), @@ -2387,15 +2387,15 @@ def take( 2 2 lion mammal 80.5 1 monkey mammal NaN - The order of the specified indices influnces the order in the result. + The order of the specified indices influences the order in the result. Here, the order is swapped from the previous example. - >>> gb.take([0, 1]) + >>> gb.take([1, 0]) name class max_speed - 1 4 falcon bird 389.0 - 3 parrot bird 24.0 - 2 2 lion mammal 80.5 - 1 monkey mammal NaN + 1 3 parrot bird 24.0 + 4 falcon bird 389.0 + 2 1 monkey mammal NaN + 2 lion mammal 80.5 Take elements at indices 1 and 2 along the axis 1 (column selection). diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index 6a79473b519fb..86bf9bf95e1cc 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -277,6 +277,7 @@ def merge_ordered( Examples -------- + >>> from pandas import merge_ordered >>> df1 = pd.DataFrame( ... { ... "key": ["a", "c", "e", "a", "c", "e"],