Skip to content

Commit 864720a

Browse files
committed
DOC: Delete more trailing blank lines in docstrings.
re: issue pandas-dev#23632
1 parent 011b79f commit 864720a

File tree

7 files changed

+3
-24
lines changed

7 files changed

+3
-24
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
@@ -746,7 +746,6 @@ def tz_localize(self, tz, ambiguous='raise', nonexistent='raise',
746746
1 2018-10-28 02:36:00+02:00
747747
2 2018-10-28 03:46:00+01:00
748748
dtype: datetime64[ns, CET]
749-
750749
"""
751750
if errors is not None:
752751
warnings.warn("The errors argument is deprecated and will be "

pandas/core/generic.py

+3-14
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,6 @@ def droplevel(self, level, axis=0):
728728
729729
axis : {0 or 'index', 1 or 'columns'}, default 0
730730
731-
732731
Returns
733732
-------
734733
DataFrame.droplevel()
@@ -767,7 +766,6 @@ def droplevel(self, level, axis=0):
767766
1 2 3 4
768767
5 6 7 8
769768
9 10 11 12
770-
771769
"""
772770
labels = self._get_axis(axis)
773771
new_labels = labels.droplevel(level)
@@ -1231,7 +1229,6 @@ def rename_axis(self, mapper=None, **kwargs):
12311229
2 3 30
12321230
c 1 4 40
12331231
2 5 50
1234-
12351232
"""
12361233
axes, kwargs = self._construct_axes_from_arguments((), kwargs)
12371234
copy = kwargs.pop('copy', True)
@@ -2072,7 +2069,6 @@ def _repr_latex_(self):
20722069
automatically chosen depending on the file extension):
20732070
20742071
>>> df1.to_excel('output1.xlsx', engine='xlsxwriter')
2075-
20762072
"""
20772073

20782074
def to_json(self, path_or_buf=None, orient=None, date_format=None,
@@ -2321,7 +2317,6 @@ def to_hdf(self, path_or_buf, key, **kwargs):
23212317
23222318
>>> import os
23232319
>>> os.remove('data.h5')
2324-
23252320
"""
23262321
from pandas.io import pytables
23272322
return pytables.to_hdf(path_or_buf, key, self, **kwargs)
@@ -3321,7 +3316,6 @@ def xs(self, key, axis=0, level=None, drop_level=True):
33213316
MultiIndex Slicers is a generic way to get/set values on any level or
33223317
levels. It is a superset of xs functionality, see
33233318
:ref:`MultiIndex Slicers <advanced.mi_slicers>`
3324-
33253319
"""
33263320
axis = self._get_axis_number(axis)
33273321
labels = self._get_axis(axis)
@@ -4883,7 +4877,6 @@ def as_matrix(self, columns=None):
48834877
If the caller is heterogeneous and contains booleans or objects,
48844878
the result will be of dtype=object. See Notes.
48854879
4886-
48874880
Notes
48884881
-----
48894882
Return is NOT a Numpy-matrix, rather, a Numpy-array.
@@ -8951,7 +8944,6 @@ def tz_localize(self, tz, axis=0, level=None, copy=True,
89518944
2018-10-28 02:36:00+02:00 1
89528945
2018-10-28 03:46:00+01:00 2
89538946
dtype: int64
8954-
89558947
"""
89568948
if nonexistent not in ('raise', 'NaT', 'shift'):
89578949
raise ValueError("The nonexistent argument must be one of 'raise',"
@@ -9648,7 +9640,7 @@ def compound(self, axis=None, skipna=None, level=None):
96489640
cls, 'kurt', name, name2, axis_descr,
96499641
"Return unbiased kurtosis over requested axis using Fisher's "
96509642
"definition of\nkurtosis (kurtosis of normal == 0.0). Normalized "
9651-
"by N-1\n",
9643+
"by N-1",
96529644
nanops.nankurt)
96539645
cls.kurtosis = cls.kurt
96549646
cls.prod = _make_min_count_stat_function(
@@ -9696,8 +9688,7 @@ def nanptp(values, axis=0, skipna=True):
96969688
``numpy.ndarray`` method ``ptp``.
96979689
96989690
.. deprecated:: 0.24.0
9699-
Use numpy.ptp instead
9700-
""",
9691+
Use numpy.ptp instead""",
97019692
nanptp)
97029693

97039694
@classmethod
@@ -9961,7 +9952,6 @@ def _doc_parms(cls):
99619952

99629953

99639954
_num_doc = """
9964-
99659955
%(desc)s
99669956
99679957
Parameters
@@ -9979,12 +9969,11 @@ def _doc_parms(cls):
99799969
99809970
Returns
99819971
-------
9982-
%(outname)s : %(name1)s or %(name2)s (if level specified)
9972+
%(outname)s : %(name1)s or %(name2)s (if level specified)\
99839973
99849974
%(examples)s"""
99859975

99869976
_num_ddof_doc = """
9987-
99889977
%(desc)s
99899978
99909979
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

-5
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)
@@ -670,7 +668,6 @@ def str_match(arr, pat, case=True, flags=0, na=np.nan):
670668
contains : analogous, but less strict, relying on re.search instead of
671669
re.match
672670
extract : extract matched groups
673-
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
@@ -2460,7 +2460,6 @@ def hist_series(self, by=None, ax=None, grid=True, xlabelsize=None,
24602460
See Also
24612461
--------
24622462
matplotlib.axes.Axes.hist : Plot a histogram using matplotlib.
2463-
24642463
"""
24652464
import matplotlib.pyplot as plt
24662465

0 commit comments

Comments
 (0)