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

DOC: Fix format of the See Also descriptions #23654

Merged
merged 3 commits into from Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion pandas/core/accessor.py
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
18 changes: 9 additions & 9 deletions pandas/core/arrays/categorical.py
Expand Up @@ -315,8 +315,8 @@ class Categorical(ExtensionArray, PandasObject):

See also
--------
pandas.api.types.CategoricalDtype : Type for categorical data
CategoricalIndex : An Index with an underlying ``Categorical``
pandas.api.types.CategoricalDtype : Type for categorical data.
CategoricalIndex : An Index with an underlying ``Categorical``.
"""

# For comparisons, so that numpy uses our implementation if the compare
Expand Down Expand Up @@ -1366,9 +1366,9 @@ def isna(self):

See also
--------
isna : top-level isna
isnull : alias of isna
Categorical.notna : boolean inverse of Categorical.isna
isna : Top-level isna.
isnull : Alias of isna.
Categorical.notna : Boolean inverse of Categorical.isna.

"""

Expand All @@ -1389,9 +1389,9 @@ def notna(self):

See also
--------
notna : top-level notna
notnull : alias of notna
Categorical.isna : boolean inverse of Categorical.notna
notna : Top-level notna.
notnull : Alias of notna.
Categorical.isna : Boolean inverse of Categorical.notna.

"""
return ~self.isna()
Expand Down Expand Up @@ -2371,7 +2371,7 @@ def isin(self, values):

See Also
--------
pandas.Series.isin : equivalent method on Series
pandas.Series.isin : Equivalent method on Series.

Examples
--------
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/arrays/datetimes.py
Expand Up @@ -566,7 +566,7 @@ def tz_convert(self, tz):

See Also
--------
DatetimeIndex.tz : A timezone that has a variable offset from UTC
DatetimeIndex.tz : A timezone that has a variable offset from UTC.
DatetimeIndex.tz_localize : Localize tz-naive DatetimeIndex to a
given time zone, or remove timezone from a tz-aware DatetimeIndex.

Expand Down Expand Up @@ -876,8 +876,8 @@ def to_period(self, freq=None):

See also
--------
pandas.PeriodIndex: Immutable ndarray holding ordinal values
pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object
pandas.PeriodIndex: Immutable ndarray holding ordinal values.
pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object.
"""
from pandas.core.arrays import PeriodArray

Expand Down
36 changes: 18 additions & 18 deletions pandas/core/arrays/interval.py
Expand Up @@ -94,11 +94,11 @@

See Also
--------
Index : The base pandas Index type
Interval : A bounded slice-like interval; the elements of an %(klass)s
interval_range : Function to create a fixed frequency IntervalIndex
cut : Bin values into discrete Intervals
qcut : Bin values into equal-sized Intervals based on rank or sample quantiles
Index : The base pandas Index type.
Interval : A bounded slice-like interval; the elements of an %(klass)s.
interval_range : Function to create a fixed frequency IntervalIndex.
cut : Bin values into discrete Intervals.
qcut : Bin values into equal-sized Intervals based on rank or sample quantiles.
"""


Expand Down Expand Up @@ -244,9 +244,9 @@ def _from_factorized(cls, values, original):

See Also
--------
interval_range : Function to create a fixed frequency IntervalIndex
%(klass)s.from_arrays : Construct from a left and right array
%(klass)s.from_tuples : Construct from a sequence of tuples
interval_range : Function to create a fixed frequency IntervalIndex.
%(klass)s.from_arrays : Construct from a left and right array.
%(klass)s.from_tuples : Construct from a sequence of tuples.
"""

@classmethod
Expand Down Expand Up @@ -354,13 +354,13 @@ def from_arrays(cls, left, right, closed='right', copy=False, dtype=None):

See Also
--------
interval_range : Function to create a fixed frequency IntervalIndex
interval_range : Function to create a fixed frequency IntervalIndex.
%(klass)s.from_arrays : Construct an %(klass)s from a left and
right array
right array.
%(klass)s.from_breaks : Construct an %(klass)s from an array of
splits
splits.
%(klass)s.from_tuples : Construct an %(klass)s from an
array-like of tuples
array-like of tuples.
"""

_interval_shared_docs['from_tuples'] = """
Expand Down Expand Up @@ -389,11 +389,11 @@ def from_arrays(cls, left, right, closed='right', copy=False, dtype=None):

See Also
--------
interval_range : Function to create a fixed frequency IntervalIndex
interval_range : Function to create a fixed frequency IntervalIndex.
%(klass)s.from_arrays : Construct an %(klass)s from a left and
right array
right array.
%(klass)s.from_breaks : Construct an %(klass)s from an array of
splits
splits.
"""

@classmethod
Expand Down Expand Up @@ -1027,9 +1027,9 @@ def repeat(self, repeats, **kwargs):

See Also
--------
Index.repeat : Equivalent function for Index
Series.repeat : Equivalent function for Series
numpy.repeat : Underlying implementation
Index.repeat : Equivalent function for Index.
Series.repeat : Equivalent function for Series.
numpy.repeat : Underlying implementation.
"""
left_repeat = self.left.repeat(repeats, **kwargs)
right_repeat = self.right.repeat(repeats, **kwargs)
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/arrays/period.py
Expand Up @@ -146,8 +146,8 @@ class PeriodArray(dtl.DatetimeLikeArrayMixin, ExtensionArray):

See Also
--------
period_array : Create a new PeriodArray
pandas.PeriodIndex : Immutable Index for period data
period_array : Create a new PeriodArray.
pandas.PeriodIndex : Immutable Index for period data.
"""
# array priority higher than numpy scalars
__array_priority__ = 1000
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/base.py
Expand Up @@ -1014,8 +1014,8 @@ def value_counts(self, normalize=False, sort=True, ascending=False,

See Also
--------
Series.count: number of non-NA elements in a Series
DataFrame.count: number of non-NA elements in a DataFrame
Series.count: Number of non-NA elements in a Series.
DataFrame.count: Number of non-NA elements in a DataFrame.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/dtypes/inference.py
Expand Up @@ -44,7 +44,7 @@ def is_number(obj):

See Also
--------
pandas.api.types.is_integer: checks a subgroup of numbers
pandas.api.types.is_integer: Checks a subgroup of numbers.

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/dtypes/missing.py
Expand Up @@ -43,7 +43,7 @@ def isna(obj):

See Also
--------
notna : boolean inverse of pandas.isna.
notna : Boolean inverse of pandas.isna.
Series.isna : Detect missing values in a Series.
DataFrame.isna : Detect missing values in a DataFrame.
Index.isna : Detect missing values in an Index.
Expand Down Expand Up @@ -274,7 +274,7 @@ def notna(obj):

See Also
--------
isna : boolean inverse of pandas.notna.
isna : Boolean inverse of pandas.notna.
Series.notna : Detect valid values in a Series.
DataFrame.notna : Detect valid values in a DataFrame.
Index.notna : Detect valid values in an Index.
Expand Down