Skip to content

Commit 89f0441

Browse files
YuechengWuWillAyd
authored andcommitted
DOC: Fix summaries not ending with a period (#24190)
1 parent 4cacd52 commit 89f0441

File tree

8 files changed

+47
-45
lines changed

8 files changed

+47
-45
lines changed

pandas/core/accessor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _delegate_method(self, name, *args, **kwargs):
5959
def _add_delegate_accessors(cls, delegate, accessors, typ,
6060
overwrite=False):
6161
"""
62-
add accessors to cls from the delegate class
62+
Add accessors to cls from the delegate class.
6363
6464
Parameters
6565
----------

pandas/core/arrays/categorical.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ def categories(self, categories):
477477
@property
478478
def ordered(self):
479479
"""
480-
Whether the categories have an ordered relationship
480+
Whether the categories have an ordered relationship.
481481
"""
482482
return self.dtype.ordered
483483

@@ -782,7 +782,7 @@ def set_ordered(self, value, inplace=False):
782782

783783
def as_ordered(self, inplace=False):
784784
"""
785-
Sets the Categorical to be ordered
785+
Set the Categorical to be ordered.
786786
787787
Parameters
788788
----------
@@ -795,7 +795,7 @@ def as_ordered(self, inplace=False):
795795

796796
def as_unordered(self, inplace=False):
797797
"""
798-
Sets the Categorical to be unordered
798+
Set the Categorical to be unordered.
799799
800800
Parameters
801801
----------

pandas/core/arrays/datetimes.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -1070,19 +1070,19 @@ def date(self):
10701070

10711071
return tslib.ints_to_pydatetime(timestamps, box="date")
10721072

1073-
year = _field_accessor('year', 'Y', "\n The year of the datetime\n")
1073+
year = _field_accessor('year', 'Y', "The year of the datetime.")
10741074
month = _field_accessor('month', 'M',
1075-
"\n The month as January=1, December=12 \n")
1076-
day = _field_accessor('day', 'D', "\nThe days of the datetime\n")
1077-
hour = _field_accessor('hour', 'h', "\nThe hours of the datetime\n")
1078-
minute = _field_accessor('minute', 'm', "\nThe minutes of the datetime\n")
1079-
second = _field_accessor('second', 's', "\nThe seconds of the datetime\n")
1075+
"The month as January=1, December=12. ")
1076+
day = _field_accessor('day', 'D', "The days of the datetime.")
1077+
hour = _field_accessor('hour', 'h', "The hours of the datetime.")
1078+
minute = _field_accessor('minute', 'm', "The minutes of the datetime.")
1079+
second = _field_accessor('second', 's', "The seconds of the datetime.")
10801080
microsecond = _field_accessor('microsecond', 'us',
1081-
"\nThe microseconds of the datetime\n")
1081+
"The microseconds of the datetime.")
10821082
nanosecond = _field_accessor('nanosecond', 'ns',
1083-
"\nThe nanoseconds of the datetime\n")
1083+
"The nanoseconds of the datetime.")
10841084
weekofyear = _field_accessor('weekofyear', 'woy',
1085-
"\nThe week ordinal of the year\n")
1085+
"The week ordinal of the year.")
10861086
week = weekofyear
10871087
_dayofweek_doc = """
10881088
The day of the week with Monday=0, Sunday=6.

pandas/core/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ def nunique(self, dropna=True):
12441244
@property
12451245
def is_unique(self):
12461246
"""
1247-
Return boolean if values in the object are unique
1247+
Return boolean if values in the object are unique.
12481248
12491249
Returns
12501250
-------
@@ -1256,7 +1256,7 @@ def is_unique(self):
12561256
def is_monotonic(self):
12571257
"""
12581258
Return boolean if values in the object are
1259-
monotonic_increasing
1259+
monotonic_increasing.
12601260
12611261
.. versionadded:: 0.19.0
12621262
@@ -1273,7 +1273,7 @@ def is_monotonic(self):
12731273
def is_monotonic_decreasing(self):
12741274
"""
12751275
Return boolean if values in the object are
1276-
monotonic_decreasing
1276+
monotonic_decreasing.
12771277
12781278
.. versionadded:: 0.19.0
12791279

pandas/core/dtypes/dtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def categories(self):
463463
@property
464464
def ordered(self):
465465
"""
466-
Whether the categories have an ordered relationship
466+
Whether the categories have an ordered relationship.
467467
"""
468468
return self._ordered
469469

pandas/core/generic.py

+20-18
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def transpose(self, *args, **kwargs):
671671

672672
def swapaxes(self, axis1, axis2, copy=True):
673673
"""
674-
Interchange axes and swap values axes appropriately
674+
Interchange axes and swap values axes appropriately.
675675
676676
Returns
677677
-------
@@ -1907,7 +1907,7 @@ def __array_wrap__(self, result, context=None):
19071907

19081908
def to_dense(self):
19091909
"""
1910-
Return dense representation of NDFrame (as opposed to sparse)
1910+
Return dense representation of NDFrame (as opposed to sparse).
19111911
"""
19121912
# compat
19131913
return self
@@ -3597,7 +3597,7 @@ class animal locomotion
35973597

35983598
def select(self, crit, axis=0):
35993599
"""
3600-
Return data corresponding to axis labels matching criteria
3600+
Return data corresponding to axis labels matching criteria.
36013601
36023602
.. deprecated:: 0.21.0
36033603
Use df.loc[df.index.map(crit)] to select via labels
@@ -4841,7 +4841,7 @@ def sample(self, n=None, frac=None, replace=False, weights=None,
48414841
return self.take(locs, axis=axis, is_copy=False)
48424842

48434843
_shared_docs['pipe'] = (r"""
4844-
Apply func(self, \*args, \*\*kwargs)
4844+
Apply func(self, \*args, \*\*kwargs).
48454845
48464846
Parameters
48474847
----------
@@ -5533,7 +5533,7 @@ def as_blocks(self, copy=True):
55335533
@property
55345534
def blocks(self):
55355535
"""
5536-
Internal property, property synonym for as_blocks()
5536+
Internal property, property synonym for as_blocks().
55375537
55385538
.. deprecated:: 0.21.0
55395539
"""
@@ -5918,7 +5918,7 @@ def infer_objects(self):
59185918
def fillna(self, value=None, method=None, axis=None, inplace=False,
59195919
limit=None, downcast=None):
59205920
"""
5921-
Fill NA/NaN values using the specified method
5921+
Fill NA/NaN values using the specified method.
59225922
59235923
Parameters
59245924
----------
@@ -6103,14 +6103,16 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
61036103

61046104
def ffill(self, axis=None, inplace=False, limit=None, downcast=None):
61056105
"""
6106-
Synonym for :meth:`DataFrame.fillna(method='ffill') <DataFrame.fillna>`
6106+
Synonym for :meth:`DataFrame.fillna(method='ffill')
6107+
<DataFrame.fillna>`.
61076108
"""
61086109
return self.fillna(method='ffill', axis=axis, inplace=inplace,
61096110
limit=limit, downcast=downcast)
61106111

61116112
def bfill(self, axis=None, inplace=False, limit=None, downcast=None):
61126113
"""
6113-
Synonym for :meth:`DataFrame.fillna(method='bfill') <DataFrame.fillna>`
6114+
Synonym for :meth:`DataFrame.fillna(method='bfill')
6115+
<DataFrame.fillna>`.
61146116
"""
61156117
return self.fillna(method='bfill', axis=axis, inplace=inplace,
61166118
limit=limit, downcast=downcast)
@@ -8254,7 +8256,7 @@ def rank(self, axis=0, method='average', numeric_only=None,
82548256
na_option='keep', ascending=True, pct=False):
82558257
"""
82568258
Compute numerical data ranks (1 through n) along axis. Equal values are
8257-
assigned a rank that is the average of the ranks of those values
8259+
assigned a rank that is the average of the ranks of those values.
82588260
82598261
Parameters
82608262
----------
@@ -8316,7 +8318,7 @@ def ranker(data):
83168318

83178319
_shared_docs['align'] = ("""
83188320
Align two objects on their axes with the
8319-
specified join method for each axis Index
8321+
specified join method for each axis Index.
83208322
83218323
Parameters
83228324
----------
@@ -9905,7 +9907,7 @@ def _add_numeric_operations(cls):
99059907

99069908
@Substitution(outname='mad',
99079909
desc="Return the mean absolute deviation of the values "
9908-
"for the requested axis",
9910+
"for the requested axis.",
99099911
name1=name, name2=name2, axis_descr=axis_descr,
99109912
min_count='', examples='')
99119913
@Appender(_num_doc)
@@ -9947,7 +9949,7 @@ def mad(self, axis=None, skipna=None, level=None):
99479949

99489950
@Substitution(outname='compounded',
99499951
desc="Return the compound percentage of the values for "
9950-
"the requested axis", name1=name, name2=name2,
9952+
"the requested axis.", name1=name, name2=name2,
99519953
axis_descr=axis_descr,
99529954
min_count='', examples='')
99539955
@Appender(_num_doc)
@@ -9977,31 +9979,31 @@ def compound(self, axis=None, skipna=None, level=None):
99779979

99789980
cls.sum = _make_min_count_stat_function(
99799981
cls, 'sum', name, name2, axis_descr,
9980-
'Return the sum of the values for the requested axis',
9982+
'Return the sum of the values for the requested axis.',
99819983
nanops.nansum, _sum_examples)
99829984
cls.mean = _make_stat_function(
99839985
cls, 'mean', name, name2, axis_descr,
9984-
'Return the mean of the values for the requested axis',
9986+
'Return the mean of the values for the requested axis.',
99859987
nanops.nanmean)
99869988
cls.skew = _make_stat_function(
99879989
cls, 'skew', name, name2, axis_descr,
9988-
'Return unbiased skew over requested axis\nNormalized by N-1',
9990+
'Return unbiased skew over requested axis\nNormalized by N-1.',
99899991
nanops.nanskew)
99909992
cls.kurt = _make_stat_function(
99919993
cls, 'kurt', name, name2, axis_descr,
99929994
"Return unbiased kurtosis over requested axis using Fisher's "
99939995
"definition of\nkurtosis (kurtosis of normal == 0.0). Normalized "
9994-
"by N-1",
9996+
"by N-1.",
99959997
nanops.nankurt)
99969998
cls.kurtosis = cls.kurt
99979999
cls.prod = _make_min_count_stat_function(
999810000
cls, 'prod', name, name2, axis_descr,
9999-
'Return the product of the values for the requested axis',
10001+
'Return the product of the values for the requested axis.',
1000010002
nanops.nanprod, _prod_examples)
1000110003
cls.product = cls.prod
1000210004
cls.median = _make_stat_function(
1000310005
cls, 'median', name, name2, axis_descr,
10004-
'Return the median of the values for the requested axis',
10006+
'Return the median of the values for the requested axis.',
1000510007
nanops.nanmedian)
1000610008
cls.max = _make_stat_function(
1000710009
cls, 'max', name, name2, axis_descr,

pandas/core/indexes/accessors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class DatetimeProperties(Properties):
130130

131131
def to_pydatetime(self):
132132
"""
133-
Return the data as an array of native Python datetime objects
133+
Return the data as an array of native Python datetime objects.
134134
135135
Timezone information is retained if present.
136136

pandas/plotting/_core.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,7 @@ def hist_series(self, by=None, ax=None, grid=True, xlabelsize=None,
24172417
xrot=None, ylabelsize=None, yrot=None, figsize=None,
24182418
bins=10, **kwds):
24192419
"""
2420-
Draw histogram of the input series using matplotlib
2420+
Draw histogram of the input series using matplotlib.
24212421
24222422
Parameters
24232423
----------
@@ -2706,7 +2706,7 @@ def __call__(self, *args, **kwargs):
27062706

27072707
class SeriesPlotMethods(BasePlotMethods):
27082708
"""
2709-
Series plotting accessor and method
2709+
Series plotting accessor and method.
27102710
27112711
Examples
27122712
--------
@@ -2739,7 +2739,7 @@ def __call__(self, kind='line', ax=None,
27392739

27402740
def line(self, **kwds):
27412741
"""
2742-
Line plot
2742+
Line plot.
27432743
27442744
Parameters
27452745
----------
@@ -2764,7 +2764,7 @@ def line(self, **kwds):
27642764

27652765
def bar(self, **kwds):
27662766
"""
2767-
Vertical bar plot
2767+
Vertical bar plot.
27682768
27692769
Parameters
27702770
----------
@@ -2780,7 +2780,7 @@ def bar(self, **kwds):
27802780

27812781
def barh(self, **kwds):
27822782
"""
2783-
Horizontal bar plot
2783+
Horizontal bar plot.
27842784
27852785
Parameters
27862786
----------
@@ -2796,7 +2796,7 @@ def barh(self, **kwds):
27962796

27972797
def box(self, **kwds):
27982798
"""
2799-
Boxplot
2799+
Boxplot.
28002800
28012801
Parameters
28022802
----------
@@ -2812,7 +2812,7 @@ def box(self, **kwds):
28122812

28132813
def hist(self, bins=10, **kwds):
28142814
"""
2815-
Histogram
2815+
Histogram.
28162816
28172817
Parameters
28182818
----------
@@ -2873,7 +2873,7 @@ def kde(self, bw_method=None, ind=None, **kwds):
28732873

28742874
def area(self, **kwds):
28752875
"""
2876-
Area plot
2876+
Area plot.
28772877
28782878
Parameters
28792879
----------
@@ -2889,7 +2889,7 @@ def area(self, **kwds):
28892889

28902890
def pie(self, **kwds):
28912891
"""
2892-
Pie chart
2892+
Pie chart.
28932893
28942894
Parameters
28952895
----------

0 commit comments

Comments
 (0)