From 03a39e44c7530232179c46dcc8d1eb83007504b5 Mon Sep 17 00:00:00 2001 From: Kara de la Marck Date: Thu, 7 Feb 2019 09:46:03 +0000 Subject: [PATCH] DOC: Fix validation type error SA05 Create check for SA05 errors in CI --- ci/code_checks.sh | 4 +-- pandas/core/algorithms.py | 4 +-- pandas/core/arrays/categorical.py | 2 +- pandas/core/computation/eval.py | 6 ++-- pandas/core/dtypes/base.py | 6 ++-- pandas/core/dtypes/dtypes.py | 2 +- pandas/core/dtypes/inference.py | 2 +- pandas/core/frame.py | 48 +++++++++++++++---------------- pandas/core/generic.py | 20 ++++++------- pandas/core/groupby/groupby.py | 12 ++++---- pandas/core/indexes/base.py | 28 +++++++++--------- pandas/core/indexes/datetimes.py | 8 +++--- pandas/core/resample.py | 14 ++++----- pandas/core/reshape/tile.py | 15 +++++----- pandas/core/series.py | 2 +- pandas/core/tools/datetimes.py | 4 +-- pandas/core/tools/numeric.py | 6 ++-- pandas/core/window.py | 20 ++++++------- pandas/errors/__init__.py | 4 +-- pandas/io/formats/style.py | 2 +- pandas/io/gbq.py | 2 +- pandas/io/html.py | 6 ++-- pandas/io/pytables.py | 4 +-- pandas/io/stata.py | 4 +-- pandas/plotting/_core.py | 30 +++++++++---------- pandas/plotting/_misc.py | 6 ++-- pandas/tseries/frequencies.py | 2 +- 27 files changed, 131 insertions(+), 132 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index d16249724127f..2bd6aa2f9c7a5 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -240,8 +240,8 @@ fi ### DOCSTRINGS ### if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then - MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, EX04, RT04, SS05)' ; echo $MSG - $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04,RT04,SS05 + MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, EX04, RT04, SS05, SA05)' ; echo $MSG + $BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04,RT04,SS05,SA05 RET=$(($RET + $?)) ; echo $MSG "DONE" fi diff --git a/pandas/core/algorithms.py b/pandas/core/algorithms.py index 02f33c49c79ae..a70a3ff06f202 100644 --- a/pandas/core/algorithms.py +++ b/pandas/core/algorithms.py @@ -295,8 +295,8 @@ def unique(values): See Also -------- - pandas.Index.unique - pandas.Series.unique + Index.unique + Series.unique Examples -------- diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index e26f6cb03a768..52fc7d259f39c 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -276,7 +276,7 @@ class Categorical(ExtensionArray, PandasObject): See Also -------- - pandas.api.types.CategoricalDtype : Type for categorical data. + api.types.CategoricalDtype : Type for categorical data. CategoricalIndex : An Index with an underlying ``Categorical``. Notes diff --git a/pandas/core/computation/eval.py b/pandas/core/computation/eval.py index b768ed6df303e..23c3e0eaace81 100644 --- a/pandas/core/computation/eval.py +++ b/pandas/core/computation/eval.py @@ -205,7 +205,7 @@ def eval(expr, parser='pandas', engine=None, truediv=True, A list of objects implementing the ``__getitem__`` special method that you can use to inject an additional collection of namespaces to use for variable lookup. For example, this is used in the - :meth:`~pandas.DataFrame.query` method to inject the + :meth:`~DataFrame.query` method to inject the ``DataFrame.index`` and ``DataFrame.columns`` variables that refer to their respective :class:`~pandas.DataFrame` instance attributes. @@ -248,8 +248,8 @@ def eval(expr, parser='pandas', engine=None, truediv=True, See Also -------- - pandas.DataFrame.query - pandas.DataFrame.eval + DataFrame.query + DataFrame.eval Notes ----- diff --git a/pandas/core/dtypes/base.py b/pandas/core/dtypes/base.py index ab1cb9cf2499a..88bbdcf342d66 100644 --- a/pandas/core/dtypes/base.py +++ b/pandas/core/dtypes/base.py @@ -153,8 +153,8 @@ class ExtensionDtype(_DtypeOpsMixin): See Also -------- - pandas.api.extensions.register_extension_dtype - pandas.api.extensions.ExtensionArray + extensions.register_extension_dtype + extensions.ExtensionArray Notes ----- @@ -173,7 +173,7 @@ class ExtensionDtype(_DtypeOpsMixin): Optionally one can override construct_array_type for construction with the name of this dtype via the Registry. See - :meth:`pandas.api.extensions.register_extension_dtype`. + :meth:`extensions.register_extension_dtype`. * construct_array_type diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index ac38b2fbbe957..f9eea8c63cfa9 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -195,7 +195,7 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype): See Also -------- - pandas.Categorical + Categorical Notes ----- diff --git a/pandas/core/dtypes/inference.py b/pandas/core/dtypes/inference.py index b11542622451c..92972c83cea53 100644 --- a/pandas/core/dtypes/inference.py +++ b/pandas/core/dtypes/inference.py @@ -44,7 +44,7 @@ def is_number(obj): See Also -------- - pandas.api.types.is_integer: Checks a subgroup of numbers. + api.types.is_integer: Checks a subgroup of numbers. Examples -------- diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 9c2f000c26c79..19da8ba5c547d 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -320,7 +320,7 @@ class DataFrame(NDFrame): DataFrame.from_records : Constructor from tuples, also record arrays. DataFrame.from_dict : From dicts of Series, arrays, or dicts. DataFrame.from_items : From sequence of (key, value) pairs - pandas.read_csv, pandas.read_table, pandas.read_clipboard. + read_csv, pandas.read_table, pandas.read_clipboard. Examples -------- @@ -735,7 +735,7 @@ def style(self): See Also -------- - pandas.io.formats.style.Styler + io.formats.style.Styler """ from pandas.io.formats.style import Styler return Styler(self) @@ -1417,7 +1417,7 @@ def to_gbq(self, destination_table, project_id=None, chunksize=None, See Also -------- pandas_gbq.to_gbq : This function in the pandas-gbq library. - pandas.read_gbq : Read a DataFrame from Google BigQuery. + read_gbq : Read a DataFrame from Google BigQuery. """ from pandas.io import gbq return gbq.to_gbq( @@ -1843,14 +1843,14 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, Read CSV file. .. deprecated:: 0.21.0 - Use :func:`pandas.read_csv` instead. + Use :func:`read_csv` instead. - It is preferable to use the more powerful :func:`pandas.read_csv` + It is preferable to use the more powerful :func:`read_csv` for most general purposes, but ``from_csv`` makes for an easy roundtrip to and from a file (the exact counterpart of ``to_csv``), especially with a DataFrame of time series data. - This method only differs from the preferred :func:`pandas.read_csv` + This method only differs from the preferred :func:`read_csv` in some defaults: - `index_col` is ``0`` instead of ``None`` (take first column as index @@ -1887,7 +1887,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, See Also -------- - pandas.read_csv + read_csv """ warnings.warn("from_csv is deprecated. Please use read_csv(...) " @@ -2504,7 +2504,7 @@ def memory_usage(self, index=True, deep=False): numpy.ndarray.nbytes : Total bytes consumed by the elements of an ndarray. Series.memory_usage : Bytes consumed by a Series. - pandas.Categorical : Memory-efficient array for string values with + Categorical : Memory-efficient array for string values with many repeated values. DataFrame.info : Concise summary of a DataFrame. @@ -2987,7 +2987,7 @@ def query(self, expr, inplace=False, **kwargs): Whether the query should modify the data in place or return a modified copy. **kwargs - See the documentation for :func:`pandas.eval` for complete details + See the documentation for :func:`eval` for complete details on the keyword arguments accepted by :meth:`DataFrame.query`. .. versionadded:: 0.18.0 @@ -3011,7 +3011,7 @@ def query(self, expr, inplace=False, **kwargs): multidimensional key (e.g., a DataFrame) then the result will be passed to :meth:`DataFrame.__getitem__`. - This method uses the top-level :func:`pandas.eval` function to + This method uses the top-level :func:`eval` function to evaluate the passed query. The :meth:`~pandas.DataFrame.query` method uses a slightly @@ -3098,7 +3098,7 @@ def eval(self, expr, inplace=False, **kwargs): .. versionadded:: 0.18.0. kwargs : dict - See the documentation for :func:`~pandas.eval` for complete details + See the documentation for :func:`eval` for complete details on the keyword arguments accepted by :meth:`~pandas.DataFrame.query`. @@ -3113,12 +3113,12 @@ def eval(self, expr, inplace=False, **kwargs): of a frame. DataFrame.assign : Can evaluate an expression or function to create new values for a column. - pandas.eval : Evaluate a Python expression as a string using various + eval : Evaluate a Python expression as a string using various backends. Notes ----- - For more details see the API documentation for :func:`~pandas.eval`. + For more details see the API documentation for :func:`~eval`. For detailed examples see :ref:`enhancing performance with eval `. @@ -3957,7 +3957,7 @@ def rename(self, *args, **kwargs): See Also -------- - pandas.DataFrame.rename_axis + DataFrame.rename_axis Examples -------- @@ -6203,11 +6203,11 @@ def _gotitem(self, -------- DataFrame.apply : Perform any type of operations. DataFrame.transform : Perform transformation type operations. - pandas.core.groupby.GroupBy : Perform operations over groups. - pandas.core.resample.Resampler : Perform operations over resampled bins. - pandas.core.window.Rolling : Perform operations over rolling window. - pandas.core.window.Expanding : Perform operations over expanding window. - pandas.core.window.EWM : Perform operation over exponential weighted + core.groupby.GroupBy : Perform operations over groups. + core.resample.Resampler : Perform operations over resampled bins. + core.window.Rolling : Perform operations over rolling window. + core.window.Expanding : Perform operations over expanding window. + core.window.EWM : Perform operation over exponential weighted window. """) @@ -6559,7 +6559,7 @@ def append(self, other, ignore_index=False, See Also -------- - pandas.concat : General function to concatenate DataFrame, Series + concat : General function to concatenate DataFrame, Series or Panel objects. Notes @@ -7069,10 +7069,10 @@ def cov(self, min_periods=None): See Also -------- - pandas.Series.cov : Compute covariance with another Series. - pandas.core.window.EWM.cov: Exponential weighted sample covariance. - pandas.core.window.Expanding.cov : Expanding sample covariance. - pandas.core.window.Rolling.cov : Rolling sample covariance. + Series.cov : Compute covariance with another Series. + core.window.EWM.cov: Exponential weighted sample covariance. + core.window.Expanding.cov : Expanding sample covariance. + core.window.Rolling.cov : Rolling sample covariance. Notes ----- diff --git a/pandas/core/generic.py b/pandas/core/generic.py index d03d78bd9f18c..bb5c0e49e4dd1 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -986,7 +986,7 @@ def rename(self, *args, **kwargs): See Also -------- - pandas.NDFrame.rename_axis + NDFrame.rename_axis Examples -------- @@ -1861,8 +1861,8 @@ def empty(self): See Also -------- - pandas.Series.dropna - pandas.DataFrame.dropna + Series.dropna + DataFrame.dropna Notes ----- @@ -5272,8 +5272,8 @@ def values(self): See Also -------- DataFrame.to_numpy : Recommended alternative to this method. - pandas.DataFrame.index : Retrieve the index labels. - pandas.DataFrame.columns : Retrieving the column names. + DataFrame.index : Retrieve the index labels. + DataFrame.columns : Retrieving the column names. Notes ----- @@ -5344,7 +5344,7 @@ def get_values(self): Return an ndarray after converting sparse values to dense. This is the same as ``.values`` for non-sparse data. For sparse - data contained in a `pandas.SparseArray`, the data are first + data contained in a `SparseArray`, the data are first converted to a dense representation. Returns @@ -5355,7 +5355,7 @@ def get_values(self): See Also -------- values : Numpy representation of DataFrame. - pandas.SparseArray : Container for sparse data. + SparseArray : Container for sparse data. Examples -------- @@ -5476,7 +5476,7 @@ def dtypes(self): See Also -------- - pandas.DataFrame.ftypes : Dtype and sparsity information. + DataFrame.ftypes : Dtype and sparsity information. Examples -------- @@ -5512,8 +5512,8 @@ def ftypes(self): See Also -------- - pandas.DataFrame.dtypes: Series with just dtype information. - pandas.SparseDataFrame : Container for sparse tabular data. + DataFrame.dtypes: Series with just dtype information. + SparseDataFrame : Container for sparse tabular data. Notes ----- diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index bfb5ba4fc8c90..c8f1a75b2eff5 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -44,9 +44,9 @@ class providing the base-class of operations. _common_see_also = """ See Also -------- - pandas.Series.%(name)s - pandas.DataFrame.%(name)s - pandas.Panel.%(name)s + Series.%(name)s + DataFrame.%(name)s + Panel.%(name)s """ _apply_docs = dict( @@ -206,8 +206,8 @@ class providing the base-class of operations. See Also -------- -pandas.Series.pipe : Apply a function with arguments to a series. -pandas.DataFrame.pipe: Apply a function with arguments to a dataframe. +Series.pipe : Apply a function with arguments to a series. +DataFrame.pipe: Apply a function with arguments to a dataframe. apply : Apply function to each group instead of to the full %(klass)s object. @@ -1351,7 +1351,7 @@ def resample(self, rule, *args, **kwargs): See Also -------- - pandas.Grouper : Specify a frequency to resample with when + Grouper : Specify a frequency to resample with when grouping by a key. DatetimeIndex.resample : Frequency conversion and resampling of time series. diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 664bf3a4040d8..cf813f4c3030b 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1832,9 +1832,9 @@ def isna(self): See Also -------- - pandas.Index.notna : Boolean inverse of isna. - pandas.Index.dropna : Omit entries with missing values. - pandas.isna : Top-level isna. + Index.notna : Boolean inverse of isna. + Index.dropna : Omit entries with missing values. + isna : Top-level isna. Series.isna : Detect missing values in Series object. Examples @@ -1892,7 +1892,7 @@ def notna(self): -------- Index.notnull : Alias of notna. Index.isna: Inverse of notna. - pandas.notna : Top-level notna. + notna : Top-level notna. Examples -------- @@ -2074,9 +2074,9 @@ def duplicated(self, keep='first'): See Also -------- - pandas.Series.duplicated : Equivalent method on pandas.Series. - pandas.DataFrame.duplicated : Equivalent method on pandas.DataFrame. - pandas.Index.drop_duplicates : Remove duplicate values from Index. + Series.duplicated : Equivalent method on pandas.Series. + DataFrame.duplicated : Equivalent method on pandas.DataFrame. + Index.drop_duplicates : Remove duplicate values from Index. Examples -------- @@ -4204,8 +4204,8 @@ def sort_values(self, return_indexer=False, ascending=True): See Also -------- - pandas.Series.sort_values : Sort values of a Series. - pandas.DataFrame.sort_values : Sort values in a DataFrame. + Series.sort_values : Sort values of a Series. + DataFrame.sort_values : Sort values in a DataFrame. Examples -------- @@ -5177,9 +5177,9 @@ def _add_logical_methods(cls): See Also -------- - pandas.Index.any : Return whether any element in an Index is True. - pandas.Series.any : Return whether any element in a Series is True. - pandas.Series.all : Return whether all elements in a Series are True. + Index.any : Return whether any element in an Index is True. + Series.any : Return whether any element in a Series is True. + Series.all : Return whether all elements in a Series are True. Notes ----- @@ -5217,8 +5217,8 @@ def _add_logical_methods(cls): See Also -------- - pandas.Index.all : Return whether all elements are True. - pandas.Series.all : Return whether all elements are True. + Index.all : Return whether all elements are True. + Series.all : Return whether all elements are True. Notes ----- diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index f34eb75d352a1..df91c71cfe238 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -1413,10 +1413,10 @@ def date_range(start=None, end=None, periods=None, freq=None, tz=None, See Also -------- - pandas.DatetimeIndex : An immutable container for datetimes. - pandas.timedelta_range : Return a fixed frequency TimedeltaIndex. - pandas.period_range : Return a fixed frequency PeriodIndex. - pandas.interval_range : Return a fixed frequency IntervalIndex. + DatetimeIndex : An immutable container for datetimes. + timedelta_range : Return a fixed frequency TimedeltaIndex. + period_range : Return a fixed frequency PeriodIndex. + interval_range : Return a fixed frequency IntervalIndex. Notes ----- diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 42ca488572e36..e26176cffc66d 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -213,9 +213,9 @@ def pipe(self, func, *args, **kwargs): _agg_see_also_doc = dedent(""" See Also -------- - pandas.DataFrame.groupby.aggregate - pandas.DataFrame.resample.transform - pandas.DataFrame.aggregate + DataFrame.groupby.aggregate + DataFrame.resample.transform + DataFrame.aggregate """) _agg_examples_doc = dedent(""" @@ -517,9 +517,9 @@ def backfill(self, limit=None): 'backfill'. nearest : Fill NaN values with nearest neighbor starting from center. pad : Forward fill NaN values. - pandas.Series.fillna : Fill NaN values in the Series using the + Series.fillna : Fill NaN values in the Series using the specified method, which can be 'backfill'. - pandas.DataFrame.fillna : Fill NaN values in the DataFrame using the + DataFrame.fillna : Fill NaN values in the DataFrame using the specified method, which can be 'backfill'. References @@ -630,9 +630,9 @@ def fillna(self, method, limit=None): nearest : Fill NaN values in the resampled data with nearest neighbor starting from center. interpolate : Fill NaN values using interpolation. - pandas.Series.fillna : Fill NaN values in the Series using the + Series.fillna : Fill NaN values in the Series using the specified method, which can be 'bfill' and 'ffill'. - pandas.DataFrame.fillna : Fill NaN values in the DataFrame using the + DataFrame.fillna : Fill NaN values in the DataFrame using the specified method, which can be 'bfill' and 'ffill'. References diff --git a/pandas/core/reshape/tile.py b/pandas/core/reshape/tile.py index c107ed51226b0..7ad2549bd22c3 100644 --- a/pandas/core/reshape/tile.py +++ b/pandas/core/reshape/tile.py @@ -35,7 +35,7 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3, ---------- x : array-like The input array to be binned. Must be 1-dimensional. - bins : int, sequence of scalars, or pandas.IntervalIndex + bins : int, sequence of scalars, or IntervalIndex The criteria to bin by. * int : Defines the number of equal-width bins in the range of `x`. The @@ -70,16 +70,16 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3, Returns ------- - out : pandas.Categorical, Series, or ndarray + out : Categorical, Series, or ndarray An array-like object representing the respective bin for each value of `x`. The type depends on the value of `labels`. * True (default) : returns a Series for Series `x` or a - pandas.Categorical for all other inputs. The values stored within + Categorical for all other inputs. The values stored within are Interval dtype. * sequence of scalars : returns a Series for Series `x` or a - pandas.Categorical for all other inputs. The values stored within + Categorical for all other inputs. The values stored within are whatever the type in the sequence is. * False : returns an ndarray of integers. @@ -94,16 +94,15 @@ def cut(x, bins, right=True, labels=None, retbins=False, precision=3, -------- qcut : Discretize variable into equal-sized buckets based on rank or based on sample quantiles. - pandas.Categorical : Array type for storing data that come from a + Categorical : Array type for storing data that come from a fixed set of values. Series : One-dimensional array with axis labels (including time series). - pandas.IntervalIndex : Immutable Index implementing an ordered, - sliceable set. + IntervalIndex : Immutable Index implementing an ordered, sliceable set. Notes ----- Any NA values will be NA in the result. Out of bounds values will be NA in - the resulting Series or pandas.Categorical object. + the resulting Series or Categorical object. Examples -------- diff --git a/pandas/core/series.py b/pandas/core/series.py index 0b90146d3a548..b2011fdcdee98 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -693,7 +693,7 @@ def __array__(self, dtype=None): See Also -------- - pandas.array : Create a new array from data. + array : Create a new array from data. Series.array : Zero-copy view to the array backing the Series. Series.to_numpy : Series method for similar behavior. diff --git a/pandas/core/tools/datetimes.py b/pandas/core/tools/datetimes.py index e6478da400d76..3da349c570274 100644 --- a/pandas/core/tools/datetimes.py +++ b/pandas/core/tools/datetimes.py @@ -497,8 +497,8 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False, See Also -------- - pandas.DataFrame.astype : Cast argument to a specified dtype. - pandas.to_timedelta : Convert argument to timedelta. + DataFrame.astype : Cast argument to a specified dtype. + to_timedelta : Convert argument to timedelta. Examples -------- diff --git a/pandas/core/tools/numeric.py b/pandas/core/tools/numeric.py index 24f3e6753e500..bfe78b9296c40 100644 --- a/pandas/core/tools/numeric.py +++ b/pandas/core/tools/numeric.py @@ -63,9 +63,9 @@ def to_numeric(arg, errors='raise', downcast=None): See Also -------- - pandas.DataFrame.astype : Cast argument to a specified dtype. - pandas.to_datetime : Convert argument to datetime. - pandas.to_timedelta : Convert argument to timedelta. + DataFrame.astype : Cast argument to a specified dtype. + to_datetime : Convert argument to datetime. + to_timedelta : Convert argument to timedelta. numpy.ndarray.astype : Cast a numpy array to a specified type. Examples diff --git a/pandas/core/window.py b/pandas/core/window.py index 060226d94cca0..5f3ea7db53d09 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -900,9 +900,9 @@ class _Rolling_and_Expanding(_Rolling): See Also -------- - pandas.Series.%(name)s : Calling object with Series data. - pandas.DataFrame.%(name)s : Calling object with DataFrames. - pandas.DataFrame.count : Count of the full DataFrame. + Series.%(name)s : Calling object with Series data. + DataFrame.%(name)s : Calling object with DataFrames. + DataFrame.count : Count of the full DataFrame. Examples -------- @@ -1322,9 +1322,9 @@ def kurt(self, **kwargs): See Also -------- - pandas.Series.quantile : Computes value at the given quantile over all data + Series.quantile : Computes value at the given quantile over all data in Series. - pandas.DataFrame.quantile : Computes values at the given quantile over + DataFrame.quantile : Computes values at the given quantile over requested axis in DataFrame. Examples @@ -1626,8 +1626,8 @@ def _validate_freq(self): _agg_see_also_doc = dedent(""" See Also -------- - pandas.Series.rolling - pandas.DataFrame.rolling + Series.rolling + DataFrame.rolling """) _agg_examples_doc = dedent(""" @@ -1916,9 +1916,9 @@ def _get_window(self, other=None): _agg_see_also_doc = dedent(""" See Also -------- - pandas.DataFrame.expanding.aggregate - pandas.DataFrame.rolling.aggregate - pandas.DataFrame.aggregate + DataFrame.expanding.aggregate + DataFrame.rolling.aggregate + DataFrame.aggregate """) _agg_examples_doc = dedent(""" diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py index eb6a4674a7497..c57d27ff03ac6 100644 --- a/pandas/errors/__init__.py +++ b/pandas/errors/__init__.py @@ -45,8 +45,8 @@ class DtypeWarning(Warning): See Also -------- - pandas.read_csv : Read CSV (comma-separated) file into a DataFrame. - pandas.read_table : Read general delimited file into a DataFrame. + read_csv : Read CSV (comma-separated) file into a DataFrame. + read_table : Read general delimited file into a DataFrame. Notes ----- diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 790cff95827fc..d241528d9779b 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -81,7 +81,7 @@ class Styler(object): See Also -------- - pandas.DataFrame.style + DataFrame.style Notes ----- diff --git a/pandas/io/gbq.py b/pandas/io/gbq.py index 639b68d433ac6..a6cec7ea8fb16 100644 --- a/pandas/io/gbq.py +++ b/pandas/io/gbq.py @@ -127,7 +127,7 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None, See Also -------- pandas_gbq.read_gbq : This function in the pandas-gbq library. - pandas.DataFrame.to_gbq : Write a DataFrame to Google BigQuery. + DataFrame.to_gbq : Write a DataFrame to Google BigQuery. """ pandas_gbq = _try_import() diff --git a/pandas/io/html.py b/pandas/io/html.py index 74934740a6957..347bb3eec54af 100644 --- a/pandas/io/html.py +++ b/pandas/io/html.py @@ -988,7 +988,7 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None, latest information on table attributes for the modern web. parse_dates : bool, optional - See :func:`~pandas.read_csv` for more details. + See :func:`~read_csv` for more details. tupleize_cols : bool, optional If ``False`` try to parse multiple header rows into a @@ -1043,7 +1043,7 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None, See Also -------- - pandas.read_csv + read_csv Notes ----- @@ -1066,7 +1066,7 @@ def read_html(io, match='.+', flavor=None, header=None, index_col=None, .. versionadded:: 0.21.0 - Similar to :func:`~pandas.read_csv` the `header` argument is applied + Similar to :func:`~read_csv` the `header` argument is applied **after** `skiprows` is applied. This function will *always* return a list of :class:`DataFrame` *or* diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 00fa01bb23c8c..2813d722246bd 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -326,8 +326,8 @@ def read_hdf(path_or_buf, key=None, mode='r', **kwargs): See Also -------- - pandas.DataFrame.to_hdf : Write a HDF file from a DataFrame. - pandas.HDFStore : Low-level access to HDF files. + DataFrame.to_hdf : Write a HDF file from a DataFrame. + HDFStore : Low-level access to HDF files. Examples -------- diff --git a/pandas/io/stata.py b/pandas/io/stata.py index 9ba3290c0b51a..62a9dbdc4657e 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -100,8 +100,8 @@ See Also -------- -pandas.io.stata.StataReader : Low-level reader for Stata data files. -pandas.DataFrame.to_stata: Export Stata data files. +io.stata.StataReader : Low-level reader for Stata data files. +DataFrame.to_stata: Export Stata data files. Examples -------- diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 85549bafa8dc0..1790c70a3c8ac 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -2957,7 +2957,7 @@ def line(self, x=None, y=None, **kwds): Either the location or the label of the columns to be used. By default, it will use the remaining DataFrame numeric columns. **kwds - Keyword arguments to pass on to :meth:`pandas.DataFrame.plot`. + Keyword arguments to pass on to :meth:`DataFrame.plot`. Returns ------- @@ -3022,7 +3022,7 @@ def bar(self, x=None, y=None, **kwds): all numerical columns are used. **kwds Additional keyword arguments are documented in - :meth:`pandas.DataFrame.plot`. + :meth:`DataFrame.plot`. Returns ------- @@ -3032,8 +3032,8 @@ def bar(self, x=None, y=None, **kwds): See Also -------- - pandas.DataFrame.plot.barh : Horizontal bar plot. - pandas.DataFrame.plot : Make plots of a DataFrame. + DataFrame.plot.barh : Horizontal bar plot. + DataFrame.plot : Make plots of a DataFrame. matplotlib.pyplot.bar : Make a bar plot with matplotlib. Examples @@ -3104,7 +3104,7 @@ def barh(self, x=None, y=None, **kwds): y : label or position, default All numeric columns in dataframe Columns to be plotted from the DataFrame. **kwds - Keyword arguments to pass on to :meth:`pandas.DataFrame.plot`. + Keyword arguments to pass on to :meth:`DataFrame.plot`. Returns ------- @@ -3112,8 +3112,8 @@ def barh(self, x=None, y=None, **kwds): See Also -------- - pandas.DataFrame.plot.bar: Vertical bar plot. - pandas.DataFrame.plot : Make plots of DataFrame using matplotlib. + DataFrame.plot.bar: Vertical bar plot. + DataFrame.plot : Make plots of DataFrame using matplotlib. matplotlib.axes.Axes.bar : Plot a vertical bar plot using matplotlib. Examples @@ -3191,7 +3191,7 @@ def box(self, by=None, **kwds): Column in the DataFrame to group by. **kwds : optional Additional keywords are documented in - :meth:`pandas.DataFrame.plot`. + :meth:`DataFrame.plot`. Returns ------- @@ -3199,8 +3199,8 @@ def box(self, by=None, **kwds): See Also -------- - pandas.DataFrame.boxplot: Another method to draw a box plot. - pandas.Series.plot.box: Draw a box plot from a Series object. + DataFrame.boxplot: Another method to draw a box plot. + Series.plot.box: Draw a box plot from a Series object. matplotlib.pyplot.boxplot: Draw a box plot in matplotlib. Examples @@ -3234,7 +3234,7 @@ def hist(self, by=None, bins=10, **kwds): Number of histogram bins to be used. **kwds Additional keyword arguments are documented in - :meth:`pandas.DataFrame.plot`. + :meth:`DataFrame.plot`. Returns ------- @@ -3327,7 +3327,7 @@ def area(self, x=None, y=None, **kwds): unstacked plot. **kwds : optional Additional keyword arguments are documented in - :meth:`pandas.DataFrame.plot`. + :meth:`DataFrame.plot`. Returns ------- @@ -3398,7 +3398,7 @@ def pie(self, y=None, **kwds): Label or position of the column to plot. If not provided, ``subplots=True`` argument must be passed. **kwds - Keyword arguments to pass on to :meth:`pandas.DataFrame.plot`. + Keyword arguments to pass on to :meth:`DataFrame.plot`. Returns ------- @@ -3474,7 +3474,7 @@ def scatter(self, x, y, s=None, c=None, **kwds): marker points according to a colormap. **kwds - Keyword arguments to pass on to :meth:`pandas.DataFrame.plot`. + Keyword arguments to pass on to :meth:`DataFrame.plot`. Returns ------- @@ -3548,7 +3548,7 @@ def hexbin(self, x, y, C=None, reduce_C_function=None, gridsize=None, y-direction. **kwds Additional keyword arguments are documented in - :meth:`pandas.DataFrame.plot`. + :meth:`DataFrame.plot`. Returns ------- diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 01cc8ecc6f957..62a33245f99ef 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -182,7 +182,7 @@ def radviz(frame, class_column, ax=None, color=None, colormap=None, **kwds): See Also -------- - pandas.plotting.andrews_curves : Plot clustering visualization. + plotting.andrews_curves : Plot clustering visualization. Examples -------- @@ -394,8 +394,8 @@ def bootstrap_plot(series, fig=None, size=50, samples=500, **kwds): See Also -------- - pandas.DataFrame.plot : Basic plotting for DataFrame objects. - pandas.Series.plot : Basic plotting for Series objects. + DataFrame.plot : Basic plotting for DataFrame objects. + Series.plot : Basic plotting for Series objects. Examples -------- diff --git a/pandas/tseries/frequencies.py b/pandas/tseries/frequencies.py index c454db3bbdffc..f591b24f5b648 100644 --- a/pandas/tseries/frequencies.py +++ b/pandas/tseries/frequencies.py @@ -77,7 +77,7 @@ def to_offset(freq): See Also -------- - pandas.DateOffset + DateOffset Examples --------