Skip to content

Commit 2a7b2e6

Browse files
syutbaiPingviinituutti
authored andcommitted
DOC: Fix format of the See Also descriptions (pandas-dev#23654)
* pandas refs 23630, partial.
1 parent 52aee7d commit 2a7b2e6

31 files changed

+265
-264
lines changed

pandas/core/arrays/categorical.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ class Categorical(ExtensionArray, PandasObject):
315315
316316
See Also
317317
--------
318-
pandas.api.types.CategoricalDtype : Type for categorical data
319-
CategoricalIndex : An Index with an underlying ``Categorical``
318+
pandas.api.types.CategoricalDtype : Type for categorical data.
319+
CategoricalIndex : An Index with an underlying ``Categorical``.
320320
"""
321321

322322
# For comparisons, so that numpy uses our implementation if the compare
@@ -1366,9 +1366,9 @@ def isna(self):
13661366
13671367
See Also
13681368
--------
1369-
isna : top-level isna
1370-
isnull : alias of isna
1371-
Categorical.notna : boolean inverse of Categorical.isna
1369+
isna : Top-level isna.
1370+
isnull : Alias of isna.
1371+
Categorical.notna : Boolean inverse of Categorical.isna.
13721372
13731373
"""
13741374

@@ -1389,9 +1389,9 @@ def notna(self):
13891389
13901390
See Also
13911391
--------
1392-
notna : top-level notna
1393-
notnull : alias of notna
1394-
Categorical.isna : boolean inverse of Categorical.notna
1392+
notna : Top-level notna.
1393+
notnull : Alias of notna.
1394+
Categorical.isna : Boolean inverse of Categorical.notna.
13951395
13961396
"""
13971397
return ~self.isna()
@@ -2371,7 +2371,7 @@ def isin(self, values):
23712371
23722372
See Also
23732373
--------
2374-
pandas.Series.isin : equivalent method on Series
2374+
pandas.Series.isin : Equivalent method on Series.
23752375
23762376
Examples
23772377
--------

pandas/core/arrays/datetimes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def tz_convert(self, tz):
584584
585585
See Also
586586
--------
587-
DatetimeIndex.tz : A timezone that has a variable offset from UTC
587+
DatetimeIndex.tz : A timezone that has a variable offset from UTC.
588588
DatetimeIndex.tz_localize : Localize tz-naive DatetimeIndex to a
589589
given time zone, or remove timezone from a tz-aware DatetimeIndex.
590590
@@ -894,8 +894,8 @@ def to_period(self, freq=None):
894894
895895
See Also
896896
--------
897-
pandas.PeriodIndex: Immutable ndarray holding ordinal values
898-
pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object
897+
pandas.PeriodIndex: Immutable ndarray holding ordinal values.
898+
pandas.DatetimeIndex.to_pydatetime: Return DatetimeIndex as object.
899899
"""
900900
from pandas.core.arrays import PeriodArray
901901

pandas/core/arrays/interval.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@
9494
9595
See Also
9696
--------
97-
Index : The base pandas Index type
98-
Interval : A bounded slice-like interval; the elements of an %(klass)s
99-
interval_range : Function to create a fixed frequency IntervalIndex
100-
cut : Bin values into discrete Intervals
101-
qcut : Bin values into equal-sized Intervals based on rank or sample quantiles
97+
Index : The base pandas Index type.
98+
Interval : A bounded slice-like interval; the elements of an %(klass)s.
99+
interval_range : Function to create a fixed frequency IntervalIndex.
100+
cut : Bin values into discrete Intervals.
101+
qcut : Bin values into equal-sized Intervals based on rank or sample quantiles.
102102
"""
103103

104104

@@ -244,9 +244,9 @@ def _from_factorized(cls, values, original):
244244
245245
See Also
246246
--------
247-
interval_range : Function to create a fixed frequency IntervalIndex
248-
%(klass)s.from_arrays : Construct from a left and right array
249-
%(klass)s.from_tuples : Construct from a sequence of tuples
247+
interval_range : Function to create a fixed frequency IntervalIndex.
248+
%(klass)s.from_arrays : Construct from a left and right array.
249+
%(klass)s.from_tuples : Construct from a sequence of tuples.
250250
"""
251251

252252
@classmethod
@@ -354,13 +354,13 @@ def from_arrays(cls, left, right, closed='right', copy=False, dtype=None):
354354
355355
See Also
356356
--------
357-
interval_range : Function to create a fixed frequency IntervalIndex
357+
interval_range : Function to create a fixed frequency IntervalIndex.
358358
%(klass)s.from_arrays : Construct an %(klass)s from a left and
359-
right array
359+
right array.
360360
%(klass)s.from_breaks : Construct an %(klass)s from an array of
361-
splits
361+
splits.
362362
%(klass)s.from_tuples : Construct an %(klass)s from an
363-
array-like of tuples
363+
array-like of tuples.
364364
"""
365365

366366
_interval_shared_docs['from_tuples'] = """
@@ -389,11 +389,11 @@ def from_arrays(cls, left, right, closed='right', copy=False, dtype=None):
389389
390390
See Also
391391
--------
392-
interval_range : Function to create a fixed frequency IntervalIndex
392+
interval_range : Function to create a fixed frequency IntervalIndex.
393393
%(klass)s.from_arrays : Construct an %(klass)s from a left and
394-
right array
394+
right array.
395395
%(klass)s.from_breaks : Construct an %(klass)s from an array of
396-
splits
396+
splits.
397397
"""
398398

399399
@classmethod
@@ -1027,9 +1027,9 @@ def repeat(self, repeats, **kwargs):
10271027
10281028
See Also
10291029
--------
1030-
Index.repeat : Equivalent function for Index
1031-
Series.repeat : Equivalent function for Series
1032-
numpy.repeat : Underlying implementation
1030+
Index.repeat : Equivalent function for Index.
1031+
Series.repeat : Equivalent function for Series.
1032+
numpy.repeat : Underlying implementation.
10331033
"""
10341034
left_repeat = self.left.repeat(repeats, **kwargs)
10351035
right_repeat = self.right.repeat(repeats, **kwargs)

pandas/core/arrays/period.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ class PeriodArray(dtl.DatetimeLikeArrayMixin, ExtensionArray):
146146
147147
See Also
148148
--------
149-
period_array : Create a new PeriodArray
150-
pandas.PeriodIndex : Immutable Index for period data
149+
period_array : Create a new PeriodArray.
150+
pandas.PeriodIndex : Immutable Index for period data.
151151
"""
152152
# array priority higher than numpy scalars
153153
__array_priority__ = 1000

pandas/core/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1014,8 +1014,8 @@ def value_counts(self, normalize=False, sort=True, ascending=False,
10141014
10151015
See Also
10161016
--------
1017-
Series.count: number of non-NA elements in a Series
1018-
DataFrame.count: number of non-NA elements in a DataFrame
1017+
Series.count: Number of non-NA elements in a Series.
1018+
DataFrame.count: Number of non-NA elements in a DataFrame.
10191019
10201020
Examples
10211021
--------

pandas/core/dtypes/inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def is_number(obj):
4444
4545
See Also
4646
--------
47-
pandas.api.types.is_integer: checks a subgroup of numbers
47+
pandas.api.types.is_integer: Checks a subgroup of numbers.
4848
4949
Examples
5050
--------

pandas/core/dtypes/missing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def isna(obj):
4343
4444
See Also
4545
--------
46-
notna : boolean inverse of pandas.isna.
46+
notna : Boolean inverse of pandas.isna.
4747
Series.isna : Detect missing values in a Series.
4848
DataFrame.isna : Detect missing values in a DataFrame.
4949
Index.isna : Detect missing values in an Index.
@@ -274,7 +274,7 @@ def notna(obj):
274274
275275
See Also
276276
--------
277-
isna : boolean inverse of pandas.notna.
277+
isna : Boolean inverse of pandas.notna.
278278
Series.notna : Detect valid values in a Series.
279279
DataFrame.notna : Detect valid values in a DataFrame.
280280
Index.notna : Detect valid values in an Index.

pandas/core/frame.py

+38-37
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@
221221
222222
See Also
223223
--------
224-
merge_ordered : merge with optional filling/interpolation.
225-
merge_asof : merge on nearest keys.
226-
DataFrame.join : similar method using indices.
224+
merge_ordered : Merge with optional filling/interpolation.
225+
merge_asof : Merge on nearest keys.
226+
DataFrame.join : Similar method using indices.
227227
228228
Examples
229229
--------
@@ -348,10 +348,10 @@ class DataFrame(NDFrame):
348348
349349
See Also
350350
--------
351-
DataFrame.from_records : constructor from tuples, also record arrays
352-
DataFrame.from_dict : from dicts of Series, arrays, or dicts
353-
DataFrame.from_items : from sequence of (key, value) pairs
354-
pandas.read_csv, pandas.read_table, pandas.read_clipboard
351+
DataFrame.from_records : Constructor from tuples, also record arrays.
352+
DataFrame.from_dict : From dicts of Series, arrays, or dicts.
353+
DataFrame.from_items : From sequence of (key, value) pairs
354+
pandas.read_csv, pandas.read_table, pandas.read_clipboard.
355355
"""
356356

357357
@property
@@ -1066,8 +1066,8 @@ def from_dict(cls, data, orient='columns', dtype=None, columns=None):
10661066
See Also
10671067
--------
10681068
DataFrame.from_records : DataFrame from ndarray (structured
1069-
dtype), list of tuples, dict, or DataFrame
1070-
DataFrame : DataFrame object creation using constructor
1069+
dtype), list of tuples, dict, or DataFrame.
1070+
DataFrame : DataFrame object creation using constructor.
10711071
10721072
Examples
10731073
--------
@@ -1484,9 +1484,9 @@ def to_records(self, index=True, convert_datetime64=None):
14841484
14851485
See Also
14861486
--------
1487-
DataFrame.from_records: convert structured or record ndarray
1487+
DataFrame.from_records: Convert structured or record ndarray
14881488
to DataFrame.
1489-
numpy.recarray: ndarray that allows field access using
1489+
numpy.recarray: An ndarray that allows field access using
14901490
attributes, analogous to typed columns in a
14911491
spreadsheet.
14921492
@@ -1900,9 +1900,10 @@ def to_stata(self, fname, convert_dates=None, write_index=True,
19001900
19011901
See Also
19021902
--------
1903-
pandas.read_stata : Import Stata data files
1904-
pandas.io.stata.StataWriter : low-level writer for Stata data files
1905-
pandas.io.stata.StataWriter117 : low-level writer for version 117 files
1903+
pandas.read_stata : Import Stata data files.
1904+
pandas.io.stata.StataWriter : Low-level writer for Stata data files.
1905+
pandas.io.stata.StataWriter117 : Low-level writer for version 117
1906+
files.
19061907
19071908
Examples
19081909
--------
@@ -3729,9 +3730,9 @@ def drop(self, labels=None, axis=0, index=None, columns=None,
37293730
--------
37303731
DataFrame.loc : Label-location based indexer for selection by label.
37313732
DataFrame.dropna : Return DataFrame with labels on given axis omitted
3732-
where (all or any) data are missing
3733+
where (all or any) data are missing.
37333734
DataFrame.drop_duplicates : Return DataFrame with duplicate rows
3734-
removed, optionally only considering certain columns
3735+
removed, optionally only considering certain columns.
37353736
Series.drop : Return Series with specified index labels removed.
37363737
37373738
Raises
@@ -4683,7 +4684,7 @@ def nlargest(self, n, columns, keep='first'):
46834684
--------
46844685
DataFrame.nsmallest : Return the first `n` rows ordered by `columns` in
46854686
ascending order.
4686-
DataFrame.sort_values : Sort DataFrame by the values
4687+
DataFrame.sort_values : Sort DataFrame by the values.
46874688
DataFrame.head : Return the first `n` rows without re-ordering.
46884689
46894690
Notes
@@ -5070,7 +5071,7 @@ def combine(self, other, func, fill_value=None, overwrite=True):
50705071
See Also
50715072
--------
50725073
DataFrame.combine_first : Combine two DataFrame objects and default to
5073-
non-null values in frame calling the method
5074+
non-null values in frame calling the method.
50745075
"""
50755076
other_idxlen = len(other.index) # save for compare
50765077

@@ -5176,7 +5177,7 @@ def combine_first(self, other):
51765177
See Also
51775178
--------
51785179
DataFrame.combine : Perform series-wise operation on two DataFrames
5179-
using a given function
5180+
using a given function.
51805181
"""
51815182
import pandas.core.computation.expressions as expressions
51825183

@@ -5388,9 +5389,9 @@ def update(self, other, join='left', overwrite=True, filter_func=None,
53885389
53895390
See Also
53905391
--------
5391-
DataFrame.pivot_table : generalization of pivot that can handle
5392+
DataFrame.pivot_table : Generalization of pivot that can handle
53925393
duplicate values for one index/column pair.
5393-
DataFrame.unstack : pivot based on the index values instead of a
5394+
DataFrame.unstack : Pivot based on the index values instead of a
53945395
column.
53955396
53965397
Notes
@@ -5576,8 +5577,8 @@ def pivot(self, index=None, columns=None, values=None):
55765577
55775578
See Also
55785579
--------
5579-
DataFrame.pivot : pivot without aggregation that can handle
5580-
non-numeric data
5580+
DataFrame.pivot : Pivot without aggregation that can handle
5581+
non-numeric data.
55815582
"""
55825583

55835584
@Substitution('')
@@ -6226,9 +6227,9 @@ def apply(self, func, axis=0, broadcast=None, raw=False, reduce=None,
62266227
62276228
See Also
62286229
--------
6229-
DataFrame.applymap: For elementwise operations
6230-
DataFrame.aggregate: only perform aggregating type operations
6231-
DataFrame.transform: only perform transforming type operations
6230+
DataFrame.applymap: For elementwise operations.
6231+
DataFrame.aggregate: Only perform aggregating type operations.
6232+
DataFrame.transform: Only perform transforming type operations.
62326233
62336234
Examples
62346235
--------
@@ -6335,7 +6336,7 @@ def applymap(self, func):
63356336
63366337
See Also
63376338
--------
6338-
DataFrame.apply : Apply a function along input axis of DataFrame
6339+
DataFrame.apply : Apply a function along input axis of DataFrame.
63396340
63406341
Examples
63416342
--------
@@ -6419,7 +6420,7 @@ def append(self, other, ignore_index=False,
64196420
See Also
64206421
--------
64216422
pandas.concat : General function to concatenate DataFrame, Series
6422-
or Panel objects
6423+
or Panel objects.
64236424
64246425
Examples
64256426
--------
@@ -6886,10 +6887,10 @@ def cov(self, min_periods=None):
68866887
68876888
See Also
68886889
--------
6889-
pandas.Series.cov : compute covariance with another Series
6890-
pandas.core.window.EWM.cov: exponential weighted sample covariance
6891-
pandas.core.window.Expanding.cov : expanding sample covariance
6892-
pandas.core.window.Rolling.cov : rolling sample covariance
6890+
pandas.Series.cov : Compute covariance with another Series.
6891+
pandas.core.window.EWM.cov: Exponential weighted sample covariance.
6892+
pandas.core.window.Expanding.cov : Expanding sample covariance.
6893+
pandas.core.window.Rolling.cov : Rolling sample covariance.
68936894
68946895
Notes
68956896
-----
@@ -7046,11 +7047,11 @@ def count(self, axis=0, level=None, numeric_only=False):
70467047
70477048
See Also
70487049
--------
7049-
Series.count: number of non-NA elements in a Series
7050-
DataFrame.shape: number of DataFrame rows and columns (including NA
7051-
elements)
7052-
DataFrame.isna: boolean same-sized DataFrame showing places of NA
7053-
elements
7050+
Series.count: Number of non-NA elements in a Series.
7051+
DataFrame.shape: Number of DataFrame rows and columns (including NA
7052+
elements).
7053+
DataFrame.isna: Boolean same-sized DataFrame showing places of NA
7054+
elements.
70547055
70557056
Examples
70567057
--------

0 commit comments

Comments
 (0)