Skip to content

Commit

Permalink
DOC: Fix name of the See Also section titles in docstrings (pandas-de…
Browse files Browse the repository at this point in the history
  • Loading branch information
gueletk authored and Pingviinituutti committed Feb 28, 2019
1 parent 707edfa commit e121252
Show file tree
Hide file tree
Showing 26 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1739,7 +1739,7 @@ cdef class _Period(object):
-------
Timestamp
See also
See Also
--------
Period.end_time : Return the end Timestamp.
Period.dayofyear : Return the day of year.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def plot(self):
>>> ds.geo.plot()
# plots data on a map
See also
See Also
--------
%(others)s
"""
Expand Down
24 changes: 12 additions & 12 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class Categorical(ExtensionArray, PandasObject):
See the `user guide
<http://pandas.pydata.org/pandas-docs/stable/categorical.html>`_ for more.
See also
See Also
--------
pandas.api.types.CategoricalDtype : Type for categorical data
CategoricalIndex : An Index with an underlying ``Categorical``
Expand Down Expand Up @@ -457,7 +457,7 @@ def categories(self):
If the new categories do not validate as categories or if the
number of new categories is unequal the number of old categories
See also
See Also
--------
rename_categories
reorder_categories
Expand Down Expand Up @@ -823,7 +823,7 @@ def set_categories(self, new_categories, ordered=None, rename=False,
-------
cat : Categorical with reordered categories or None if inplace.
See also
See Also
--------
rename_categories
reorder_categories
Expand Down Expand Up @@ -894,7 +894,7 @@ def rename_categories(self, new_categories, inplace=False):
With ``inplace=False``, the new categorical is returned.
With ``inplace=True``, there is no return value.
See also
See Also
--------
reorder_categories
add_categories
Expand Down Expand Up @@ -971,7 +971,7 @@ def reorder_categories(self, new_categories, ordered=None, inplace=False):
-------
cat : Categorical with reordered categories or None if inplace.
See also
See Also
--------
rename_categories
add_categories
Expand Down Expand Up @@ -1010,7 +1010,7 @@ def add_categories(self, new_categories, inplace=False):
-------
cat : Categorical with new categories added or None if inplace.
See also
See Also
--------
rename_categories
reorder_categories
Expand Down Expand Up @@ -1058,7 +1058,7 @@ def remove_categories(self, removals, inplace=False):
-------
cat : Categorical with removed categories or None if inplace.
See also
See Also
--------
rename_categories
reorder_categories
Expand Down Expand Up @@ -1100,7 +1100,7 @@ def remove_unused_categories(self, inplace=False):
-------
cat : Categorical with unused categories dropped or None if inplace.
See also
See Also
--------
rename_categories
reorder_categories
Expand Down Expand Up @@ -1364,7 +1364,7 @@ def isna(self):
-------
a boolean array of whether my values are null
See also
See Also
--------
isna : top-level isna
isnull : alias of isna
Expand All @@ -1387,7 +1387,7 @@ def notna(self):
-------
a boolean array of whether my values are not null
See also
See Also
--------
notna : top-level notna
notnull : alias of notna
Expand Down Expand Up @@ -1503,7 +1503,7 @@ def argsort(self, *args, **kwargs):
-------
argsorted : numpy array
See also
See Also
--------
numpy.ndarray.argsort
Expand Down Expand Up @@ -2322,7 +2322,7 @@ def repeat(self, repeats, *args, **kwargs):
"""
Repeat elements of a Categorical.
See also
See Also
--------
numpy.ndarray.repeat
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ def to_period(self, freq=None):
PeriodIndex(['2017-01-01', '2017-01-02'],
dtype='period[D]', freq='D')
See also
See Also
--------
pandas.PeriodIndex: Immutable ndarray holding ordinal values
pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def repeat(self, repeats, *args, **kwargs):
"""
Repeat elements of a PeriodArray.
See also
See Also
--------
numpy.ndarray.repeat
"""
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ def argmax(self, axis=None):
"""
return a ndarray of the maximum argument indexer
See also
See Also
--------
numpy.ndarray.argmax
"""
Expand Down Expand Up @@ -863,7 +863,7 @@ def argmin(self, axis=None):
"""
return a ndarray of the minimum argument indexer
See also
See Also
--------
numpy.ndarray.argmin
"""
Expand Down
18 changes: 9 additions & 9 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ class DataFrame(NDFrame):
1 4 5 6
2 7 8 9
See also
See Also
--------
DataFrame.from_records : constructor from tuples, also record arrays
DataFrame.from_dict : from dicts of Series, arrays, or dicts
Expand Down Expand Up @@ -1694,7 +1694,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True,
datetime format based on the first datetime string. If the format
can be inferred, there often will be a large parsing speed-up.
See also
See Also
--------
pandas.read_csv
Expand Down Expand Up @@ -5592,7 +5592,7 @@ def pivot(self, index=None, columns=None, values=None):
-------
table : DataFrame
See also
See Also
--------
DataFrame.pivot : pivot without aggregation that can handle
non-numeric data
Expand Down Expand Up @@ -5797,7 +5797,7 @@ def unstack(self, level=-1, fill_value=None):
.. versionadded:: 0.18.0
See also
See Also
--------
DataFrame.pivot : Pivot a table based on column values.
DataFrame.stack : Pivot a level of the column labels (inverse operation
Expand Down Expand Up @@ -5867,7 +5867,7 @@ def unstack(self, level=-1, fill_value=None):
col_level : int or string, optional
If columns are a MultiIndex then use this level to melt.
See also
See Also
--------
%(other)s
pivot_table
Expand Down Expand Up @@ -6108,7 +6108,7 @@ def _gotitem(self,
3 NaN
dtype: float64
See also
See Also
--------
DataFrame.apply : Perform any type of operations.
DataFrame.transform : Perform transformation type operations.
Expand Down Expand Up @@ -6242,7 +6242,7 @@ def apply(self, func, axis=0, broadcast=None, raw=False, reduce=None,
side-effects, as they will take effect twice for the first
column/row.
See also
See Also
--------
DataFrame.applymap: For elementwise operations
DataFrame.aggregate: only perform aggregating type operations
Expand Down Expand Up @@ -6351,7 +6351,7 @@ def applymap(self, func):
DataFrame
Transformed DataFrame.
See also
See Also
--------
DataFrame.apply : Apply a function along input axis of DataFrame
Expand Down Expand Up @@ -6434,7 +6434,7 @@ def append(self, other, ignore_index=False,
those rows to a list and then concatenate the list with the original
DataFrame all at once.
See also
See Also
--------
pandas.concat : General function to concatenate DataFrame, Series
or Panel objects
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ def empty(self):
>>> df.dropna().empty
True
See also
See Also
--------
pandas.Series.dropna
pandas.DataFrame.dropna
Expand Down Expand Up @@ -5309,7 +5309,7 @@ def astype(self, dtype, copy=True, errors='raise', **kwargs):
1 2
dtype: int64
See also
See Also
--------
pandas.to_datetime : Convert argument to datetime.
pandas.to_timedelta : Convert argument to timedelta.
Expand Down Expand Up @@ -10090,7 +10090,7 @@ def _doc_parms(cls):
"""

_all_see_also = """\
See also
See Also
--------
pandas.Series.all : Return True if all elements are True
pandas.DataFrame.any : Return True if one (or more) elements are True
Expand All @@ -10117,7 +10117,7 @@ def _doc_parms(cls):
-------
%(outname)s : %(name1)s or %(name2)s\n
%(examples)s
See also
See Also
--------
pandas.core.window.Expanding.%(accum_func_name)s : Similar functionality
but ignores ``NaN`` values.
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def _selection_name(self):
1 1 2
2 3 4
See also
See Also
--------
pandas.Series.groupby.apply
pandas.Series.groupby.transform
Expand Down Expand Up @@ -1289,7 +1289,7 @@ class DataFrameGroupBy(NDFrameGroupBy):
1 1 2 0.590716
2 3 4 0.704907
See also
See Also
--------
pandas.DataFrame.groupby.apply
pandas.DataFrame.groupby.transform
Expand Down
10 changes: 5 additions & 5 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class providing the base-class of operations.

_doc_template = """
See also
See Also
--------
pandas.Series.%(name)s
pandas.DataFrame.%(name)s
Expand Down Expand Up @@ -91,7 +91,7 @@ class providing the base-class of operations.
--------
{examples}
See also
See Also
--------
pipe : Apply function to the full GroupBy object instead of to each
group.
Expand Down Expand Up @@ -253,7 +253,7 @@ class providing the base-class of operations.
-------
%(klass)s
See also
See Also
--------
aggregate, transform
Expand Down Expand Up @@ -1624,7 +1624,7 @@ def ngroup(self, ascending=True):
5 0
dtype: int64
See also
See Also
--------
.cumcount : Number the rows in each group.
"""
Expand Down Expand Up @@ -1680,7 +1680,7 @@ def cumcount(self, ascending=True):
5 0
dtype: int64
See also
See Also
--------
.ngroup : Number the groups themselves.
"""
Expand Down
Loading

0 comments on commit e121252

Please sign in to comment.