Skip to content

Commit e50a371

Browse files
douglatornelltm9k1
authored andcommitted
DOC: Delete more trailing blank lines in docstrings. (pandas-dev#23698)
1 parent a4233e9 commit e50a371

File tree

7 files changed

+6
-27
lines changed

7 files changed

+6
-27
lines changed

pandas/core/arrays/categorical.py

-1
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,6 @@ class CategoricalAccessor(PandasDelegate, PandasObject, NoNewAttributesMixin):
24352435
>>> s.cat.set_categories(list('abcde'))
24362436
>>> s.cat.as_ordered()
24372437
>>> s.cat.as_unordered()
2438-
24392438
"""
24402439

24412440
def __init__(self, data):

pandas/core/arrays/datetimes.py

-1
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ def tz_localize(self, tz, ambiguous='raise', nonexistent='raise',
764764
1 2018-10-28 02:36:00+02:00
765765
2 2018-10-28 03:46:00+01:00
766766
dtype: datetime64[ns, CET]
767-
768767
"""
769768
if errors is not None:
770769
warnings.warn("The errors argument is deprecated and will be "

pandas/core/generic.py

+3-14
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ def droplevel(self, level, axis=0):
730730
731731
axis : {0 or 'index', 1 or 'columns'}, default 0
732732
733-
734733
Returns
735734
-------
736735
DataFrame.droplevel()
@@ -769,7 +768,6 @@ def droplevel(self, level, axis=0):
769768
1 2 3 4
770769
5 6 7 8
771770
9 10 11 12
772-
773771
"""
774772
labels = self._get_axis(axis)
775773
new_labels = labels.droplevel(level)
@@ -1233,7 +1231,6 @@ def rename_axis(self, mapper=None, **kwargs):
12331231
2 3 30
12341232
c 1 4 40
12351233
2 5 50
1236-
12371234
"""
12381235
axes, kwargs = self._construct_axes_from_arguments((), kwargs)
12391236
copy = kwargs.pop('copy', True)
@@ -2075,7 +2072,6 @@ def _repr_latex_(self):
20752072
automatically chosen depending on the file extension):
20762073
20772074
>>> df1.to_excel('output1.xlsx', engine='xlsxwriter')
2078-
20792075
"""
20802076

20812077
def to_json(self, path_or_buf=None, orient=None, date_format=None,
@@ -2324,7 +2320,6 @@ def to_hdf(self, path_or_buf, key, **kwargs):
23242320
23252321
>>> import os
23262322
>>> os.remove('data.h5')
2327-
23282323
"""
23292324
from pandas.io import pytables
23302325
return pytables.to_hdf(path_or_buf, key, self, **kwargs)
@@ -3324,7 +3319,6 @@ def xs(self, key, axis=0, level=None, drop_level=True):
33243319
MultiIndex Slicers is a generic way to get/set values on any level or
33253320
levels. It is a superset of xs functionality, see
33263321
:ref:`MultiIndex Slicers <advanced.mi_slicers>`
3327-
33283322
"""
33293323
axis = self._get_axis_number(axis)
33303324
labels = self._get_axis(axis)
@@ -4886,7 +4880,6 @@ def as_matrix(self, columns=None):
48864880
If the caller is heterogeneous and contains booleans or objects,
48874881
the result will be of dtype=object. See Notes.
48884882
4889-
48904883
Notes
48914884
-----
48924885
Return is NOT a Numpy-matrix, rather, a Numpy-array.
@@ -8954,7 +8947,6 @@ def tz_localize(self, tz, axis=0, level=None, copy=True,
89548947
2018-10-28 02:36:00+02:00 1
89558948
2018-10-28 03:46:00+01:00 2
89568949
dtype: int64
8957-
89588950
"""
89598951
if nonexistent not in ('raise', 'NaT', 'shift'):
89608952
raise ValueError("The nonexistent argument must be one of 'raise',"
@@ -9651,7 +9643,7 @@ def compound(self, axis=None, skipna=None, level=None):
96519643
cls, 'kurt', name, name2, axis_descr,
96529644
"Return unbiased kurtosis over requested axis using Fisher's "
96539645
"definition of\nkurtosis (kurtosis of normal == 0.0). Normalized "
9654-
"by N-1\n",
9646+
"by N-1",
96559647
nanops.nankurt)
96569648
cls.kurtosis = cls.kurt
96579649
cls.prod = _make_min_count_stat_function(
@@ -9699,8 +9691,7 @@ def nanptp(values, axis=0, skipna=True):
96999691
``numpy.ndarray`` method ``ptp``.
97009692
97019693
.. deprecated:: 0.24.0
9702-
Use numpy.ptp instead
9703-
""",
9694+
Use numpy.ptp instead""",
97049695
nanptp)
97059696

97069697
@classmethod
@@ -9983,7 +9974,6 @@ def _doc_parms(cls):
99839974

99849975

99859976
_num_doc = """
9986-
99879977
%(desc)s
99889978
99899979
Parameters
@@ -10001,12 +9991,11 @@ def _doc_parms(cls):
100019991
100029992
Returns
100039993
-------
10004-
%(outname)s : %(name1)s or %(name2)s (if level specified)
9994+
%(outname)s : %(name1)s or %(name2)s (if level specified)\
100059995
100069996
%(examples)s"""
100079997

100089998
_num_ddof_doc = """
10009-
100109999
%(desc)s
1001110000
1001210001
Parameters

pandas/core/indexing.py

-1
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,6 @@ class _IXIndexer(_NDFrameIndexer):
14051405
usually better to be explicit and use ``.iloc`` or ``.loc``.
14061406
14071407
See more at :ref:`Advanced Indexing <advanced>`.
1408-
14091408
"""
14101409

14111410
def __init__(self, name, obj):

pandas/core/strings.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True):
475475
A copy of the object with all matching occurrences of `pat` replaced by
476476
`repl`.
477477
478-
479478
Raises
480479
------
481480
ValueError
@@ -549,7 +548,6 @@ def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True):
549548
1 bar
550549
2 NaN
551550
dtype: object
552-
553551
"""
554552

555553
# Check whether repl is valid (GH 13438, GH 15055)
@@ -667,10 +665,9 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan):
667665
668666
See Also
669667
--------
670-
contains : Analogous, but less strict, relying on re.search instead of
671-
re.match.
672-
extract : Extract matched groups.
673-
668+
contains : analogous, but less strict, relying on re.search instead of
669+
re.match
670+
extract : extract matched groups
674671
"""
675672
if not case:
676673
flags |= re.IGNORECASE
@@ -1177,7 +1174,6 @@ def str_findall(arr, pat, flags=0):
11771174
1 []
11781175
2 [b, b]
11791176
dtype: object
1180-
11811177
"""
11821178
regex = re.compile(pat, flags=flags)
11831179
return _na_map(regex.findall, arr)
@@ -2433,7 +2429,6 @@ def rsplit(self, pat=None, n=-1, expand=False):
24332429
Examples
24342430
--------
24352431
2436-
24372432
>>> s = pd.Series(['Linda van der Berg', 'George Pitt-Rivers'])
24382433
>>> s
24392434
0 Linda van der Berg

pandas/core/window.py

-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ class Window(_Window):
547547
2013-01-01 09:00:05 NaN
548548
2013-01-01 09:00:06 4.0
549549
550-
551550
Contrasting to an integer rolling window, this will roll a variable
552551
length window corresponding to the time period.
553552
The default for min_periods is 1.

pandas/plotting/_core.py

-1
Original file line numberDiff line numberDiff line change
@@ -2461,7 +2461,6 @@ def hist_series(self, by=None, ax=None, grid=True, xlabelsize=None,
24612461
See Also
24622462
--------
24632463
matplotlib.axes.Axes.hist : Plot a histogram using matplotlib.
2464-
24652464
"""
24662465
import matplotlib.pyplot as plt
24672466

0 commit comments

Comments
 (0)