Skip to content

DOC: Fix validation type error SA05 #25208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions pandas/core/algorithms.py
Original file line number Diff line number Diff line change
@@ -295,8 +295,8 @@ def unique(values):

See Also
--------
pandas.Index.unique
pandas.Series.unique
Index.unique
Series.unique

Examples
--------
2 changes: 1 addition & 1 deletion pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions pandas/core/computation/eval.py
Original file line number Diff line number Diff line change
@@ -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
-----
6 changes: 3 additions & 3 deletions pandas/core/dtypes/base.py
Original file line number Diff line number Diff line change
@@ -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

2 changes: 1 addition & 1 deletion pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
@@ -195,7 +195,7 @@ class CategoricalDtype(PandasExtensionDtype, ExtensionDtype):

See Also
--------
pandas.Categorical
Categorical

Notes
-----
2 changes: 1 addition & 1 deletion pandas/core/dtypes/inference.py
Original file line number Diff line number Diff line change
@@ -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
--------
48 changes: 24 additions & 24 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
@@ -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
<enhancingperf.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
-----
20 changes: 10 additions & 10 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
@@ -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
-----
12 changes: 6 additions & 6 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
@@ -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.
Loading