Skip to content
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

Rt05 documentation error fix issue 25108 #25309

Merged
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
777fe4c
pandas.plotting.bootstrap_plot doc updated
zangell44 Feb 12, 2019
a595cac
generic aggregate docstring updated
zangell44 Feb 12, 2019
507d21e
generic clip method docstring updated
zangell44 Feb 12, 2019
950f272
pandas.series.unique docstring update
zangell44 Feb 12, 2019
ba5120f
generic align docstring updated
zangell44 Feb 12, 2019
3cd359f
generic interpolate docstring updated
zangell44 Feb 12, 2019
0266006
generic asof docstric update
zangell44 Feb 12, 2019
86456dd
pandas.tseries.frequencies.to_offset return docstring fix
zangell44 Feb 12, 2019
a86736b
pandas.Index.reindex return docstring fix
zangell44 Feb 12, 2019
7d57782
indexes/base.py return docstring updates
zangell44 Feb 13, 2019
b47b886
indexes/multi.py return docstring updates
zangell44 Feb 13, 2019
63f0468
DataFrame.get_ftype_counts and DataFrame.get_values return docstring …
zangell44 Feb 13, 2019
8d4c6b4
pandas plotting area and boxplot method return docstring updates
zangell44 Feb 13, 2019
a15ec00
pandas.Panel set_value major_xs minor_xs methods return docstring upd…
zangell44 Feb 13, 2019
01a7b19
pandas.Categorical.array return docstring update
zangell44 Feb 13, 2019
998f649
pandas.unique return docstring update
zangell44 Feb 13, 2019
77bd88e
pandas.wide_to_long return docstring update
zangell44 Feb 13, 2019
b090af1
pandas.to_numeric return docstring update
zangell44 Feb 13, 2019
20adfce
pandas.core.window kurt return docstring updated
zangell44 Feb 13, 2019
0514c6f
pandas.io.formats.style.Styler.render return docstring fix
zangell44 Feb 13, 2019
0038a73
strftime return statement docstring fix
zangell44 Feb 13, 2019
021ede4
series.set_value return statement docstring fix
zangell44 Feb 13, 2019
f3a5248
DataFrame.set_value return statement docstring fix
zangell44 Feb 13, 2019
421bab7
pandas.core.Series.unique return docstring update, moved extended des…
zangell44 Feb 14, 2019
24b20a3
pandas.plotting._core.box_plot return docstring udpated, extended ret…
zangell44 Feb 14, 2019
ae87624
code_checks.sh script updated to include RT05 errors in docstring
zangell44 Feb 14, 2019
8b3d251
updated code check CI script to actually check for RT05 errors this t…
zangell44 Feb 14, 2019
6b3ed7b
pandas.plotting._core.box_plot docstring minor formatting edits
zangell44 Feb 14, 2019
dd242ea
pandas.core.Series.unique trailing period removed from Notes portion …
zangell44 Feb 14, 2019
83e120f
Merge remote-tracking branch 'upstream/master' into RT05_documentatio…
zangell44 Feb 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/code_checks.sh
Expand Up @@ -241,8 +241,8 @@ fi
### DOCSTRINGS ###
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then

MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, PR10, EX04, RT04, SS05, SA05)' ; echo $MSG
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR04,PR05,EX04,RT04,SS05,SA05
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, PR10, EX04, RT04, RT05, SS05, SA05)' ; echo $MSG
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR04,PR05,EX04,RT04,RT05,SS05,SA05
RET=$(($RET + $?)) ; echo $MSG "DONE"

fi
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/algorithms.py
Expand Up @@ -291,7 +291,7 @@ def unique(values):
unique values.
If the input is an Index, the return is an Index
If the input is a Categorical dtype, the return is a Categorical
If the input is a Series/ndarray, the return will be an ndarray
If the input is a Series/ndarray, the return will be an ndarray.

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/arrays/categorical.py
Expand Up @@ -1292,7 +1292,7 @@ def __array__(self, dtype=None):
values : numpy array
A numpy array of either the specified dtype or,
if dtype==None (default), the same dtype as
categorical.categories.dtype
categorical.categories.dtype.
"""
ret = take_1d(self.categories.values, self._codes)
if dtype and not is_dtype_equal(dtype, self.categories.dtype):
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/arrays/datetimelike.py
Expand Up @@ -154,7 +154,7 @@ def strftime(self, date_format):
Returns
-------
Index
Index of formatted strings
Index of formatted strings.

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/frame.py
Expand Up @@ -2743,7 +2743,7 @@ def set_value(self, index, col, value, takeable=False):
-------
frame : DataFrame
If label pair is contained, will be reference to calling DataFrame,
otherwise a new object
otherwise a new object.
"""
warnings.warn("set_value is deprecated and will be removed "
"in a future release. Please use "
Expand Down
18 changes: 9 additions & 9 deletions pandas/core/generic.py
Expand Up @@ -4953,7 +4953,7 @@ def pipe(self, func, *args, **kwargs):
If DataFrame.agg is called with a single function, returns a Series
If DataFrame.agg is called with several functions, returns a DataFrame
If Series.agg is called with single function, returns a scalar
If Series.agg is called with several functions, returns a Series
If Series.agg is called with several functions, returns a Series.

%(see_also)s

Expand Down Expand Up @@ -5349,7 +5349,7 @@ def get_values(self):
Returns
-------
numpy.ndarray
Numpy representation of DataFrame
Numpy representation of DataFrame.

See Also
--------
Expand Down Expand Up @@ -5428,7 +5428,7 @@ def get_ftype_counts(self):
-------
dtype : Series
Series with the count of columns with each type and
sparsity (dense/sparse)
sparsity (dense/sparse).

See Also
--------
Expand Down Expand Up @@ -6657,7 +6657,7 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
-------
Series or DataFrame
Returns the same object type as the caller, interpolated at
some or all ``NaN`` values
some or all ``NaN`` values.

See Also
--------
Expand Down Expand Up @@ -6877,11 +6877,11 @@ def asof(self, where, subset=None):
-------
scalar, Series, or DataFrame

Scalar : when `self` is a Series and `where` is a scalar
Scalar : when `self` is a Series and `where` is a scalar.
Series: when `self` is a Series and `where` is an array-like,
or when `self` is a DataFrame and `where` is a scalar
or when `self` is a DataFrame and `where` is a scalar.
DataFrame : when `self` is a DataFrame and `where` is an
array-like
array-like.

See Also
--------
Expand Down Expand Up @@ -7235,7 +7235,7 @@ def clip(self, lower=None, upper=None, axis=None, inplace=False,
-------
Series or DataFrame
Same type as calling object with the values outside the
clip boundaries replaced
clip boundaries replaced.

Examples
--------
Expand Down Expand Up @@ -8386,7 +8386,7 @@ def ranker(data):
Returns
-------
(left, right) : (%(klass)s, type of other)
Aligned objects
Aligned objects.
""")

@Appender(_shared_docs['align'] % _shared_doc_kwargs)
Expand Down
10 changes: 5 additions & 5 deletions pandas/core/indexes/base.py
Expand Up @@ -1828,7 +1828,7 @@ def isna(self):
Returns
-------
numpy.ndarray
A boolean array of whether my values are NA
A boolean array of whether my values are NA.

See Also
--------
Expand Down Expand Up @@ -3098,9 +3098,9 @@ def reindex(self, target, method=None, level=None, limit=None,
Returns
-------
new_index : pd.Index
Resulting index
Resulting index.
indexer : np.ndarray or None
Indices of output values in original index
Indices of output values in original index.

"""
# GH6552: preserve names when reindexing to non-named target
Expand Down Expand Up @@ -4259,7 +4259,7 @@ def shift(self, periods=1, freq=None):
Returns
-------
pandas.Index
Shifted index
Shifted index.

See Also
--------
Expand Down Expand Up @@ -4422,7 +4422,7 @@ def set_value(self, arr, key, value):
in the target are marked by -1.
missing : ndarray of int
An indexer into the target of the values not found.
These correspond to the -1 in the indexer array
These correspond to the -1 in the indexer array.
"""

@Appender(_index_shared_docs['get_indexer_non_unique'] % _index_doc_kwargs)
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/indexes/multi.py
Expand Up @@ -1956,7 +1956,7 @@ def swaplevel(self, i=-2, j=-1):
Returns
-------
MultiIndex
A new MultiIndex
A new MultiIndex.

.. versionchanged:: 0.18.1

Expand Down Expand Up @@ -2053,9 +2053,9 @@ def sortlevel(self, level=0, ascending=True, sort_remaining=True):
Returns
-------
sorted_index : pd.MultiIndex
Resulting index
Resulting index.
indexer : np.ndarray
Indices of output values in original index
Indices of output values in original index.
"""
from pandas.core.sorting import indexer_from_factorized

Expand Down
6 changes: 3 additions & 3 deletions pandas/core/panel.py
Expand Up @@ -540,7 +540,7 @@ def set_value(self, *args, **kwargs):
-------
panel : Panel
If label combo is contained, will be reference to calling Panel,
otherwise a new object
otherwise a new object.
"""
warnings.warn("set_value is deprecated and will be removed "
"in a future release. Please use "
Expand Down Expand Up @@ -803,7 +803,7 @@ def major_xs(self, key):
Returns
-------
y : DataFrame
Index -> minor axis, columns -> items
Index -> minor axis, columns -> items.

Notes
-----
Expand All @@ -827,7 +827,7 @@ def minor_xs(self, key):
Returns
-------
y : DataFrame
Index -> major axis, columns -> items
Index -> major axis, columns -> items.

Notes
-----
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/reshape/melt.py
Expand Up @@ -230,7 +230,7 @@ def wide_to_long(df, stubnames, i, j, sep="", suffix=r'\d+'):
-------
DataFrame
A DataFrame that contains each stub name as a variable, with new index
(i, j)
(i, j).

Notes
-----
Expand Down
24 changes: 14 additions & 10 deletions pandas/core/series.py
Expand Up @@ -1215,7 +1215,7 @@ def set_value(self, label, value, takeable=False):
-------
Series
If label is contained, will be reference to calling Series,
otherwise a new object
otherwise a new object.
"""
warnings.warn("set_value is deprecated and will be removed "
"in a future release. Please use "
Expand Down Expand Up @@ -1648,10 +1648,19 @@ def unique(self):
Returns
-------
ndarray or ExtensionArray
The unique values returned as a NumPy array. In case of an
extension-array backed Series, a new
:class:`~api.extensions.ExtensionArray` of that type with just
the unique values is returned. This includes
The unique values returned as a NumPy array. See Notes.

See Also
--------
unique : Top-level unique method for any 1-d array-like object.
Index.unique : Return Index with unique values from an Index object.

Notes
-----
Returns the unique values as a NumPy array. In case of an
extension-array backed Series, a new
:class:`~api.extensions.ExtensionArray` of that type with just
the unique values is returned. This includes

* Categorical
* Period
Expand All @@ -1660,11 +1669,6 @@ def unique(self):
* Sparse
* IntegerNA

See Also
--------
unique : Top-level unique method for any 1-d array-like object.
Index.unique : Return Index with unique values from an Index object.

Examples
--------
>>> pd.Series([2, 1, 3, 3], name='A').unique()
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/tools/numeric.py
Expand Up @@ -59,7 +59,7 @@ def to_numeric(arg, errors='raise', downcast=None):
Returns
-------
ret : numeric if parsing succeeded.
Return type depends on input. Series if Series, otherwise ndarray
Return type depends on input. Series if Series, otherwise ndarray.

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/window.py
Expand Up @@ -1271,7 +1271,7 @@ def skew(self, **kwargs):
-------
Series or DataFrame
Returned object type is determined by the caller of the %(name)s
calculation
calculation.

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/formats/style.py
Expand Up @@ -435,7 +435,7 @@ def render(self, **kwargs):
Returns
-------
rendered : str
The rendered HTML
The rendered HTML.

Notes
-----
Expand Down
21 changes: 11 additions & 10 deletions pandas/plotting/_core.py
Expand Up @@ -2050,9 +2050,17 @@ def plot_series(data, kind='line', ax=None, # Series unique

Returns
-------
result :
result
See Notes.

The return type depends on the `return_type` parameter:
See Also
--------
Series.plot.hist: Make a histogram.
matplotlib.pyplot.boxplot : Matplotlib equivalent plot.

Notes
-----
The return type depends on the `return_type` parameter:

* 'axes' : object of class matplotlib.axes.Axes
* 'dict' : dict of matplotlib.lines.Line2D objects
Expand All @@ -2063,13 +2071,6 @@ def plot_series(data, kind='line', ax=None, # Series unique
* :class:`~pandas.Series`
* :class:`~numpy.array` (for ``return_type = None``)

See Also
--------
Series.plot.hist: Make a histogram.
matplotlib.pyplot.boxplot : Matplotlib equivalent plot.

Notes
-----
Use ``return_type='dict'`` when you want to tweak the appearance
of the lines after plotting. In this case a dict containing the Lines
making up the boxes, caps, fliers, medians, and whiskers is returned.
Expand Down Expand Up @@ -3332,7 +3333,7 @@ def area(self, x=None, y=None, **kwds):
Returns
-------
matplotlib.axes.Axes or numpy.ndarray
Area plot, or array of area plots if subplots is True
Area plot, or array of area plots if subplots is True.

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/plotting/_misc.py
Expand Up @@ -390,7 +390,7 @@ def bootstrap_plot(series, fig=None, size=50, samples=500, **kwds):
Returns
-------
fig : matplotlib.figure.Figure
Matplotlib figure
Matplotlib figure.

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/tseries/frequencies.py
Expand Up @@ -68,7 +68,7 @@ def to_offset(freq):
Returns
-------
delta : DateOffset
None if freq is None
None if freq is None.

Raises
------
Expand Down