diff --git a/pandas/core/arrays/categorical.py b/pandas/core/arrays/categorical.py index 4363f3ccb14e2..933a728250031 100644 --- a/pandas/core/arrays/categorical.py +++ b/pandas/core/arrays/categorical.py @@ -2435,7 +2435,6 @@ class CategoricalAccessor(PandasDelegate, PandasObject, NoNewAttributesMixin): >>> s.cat.set_categories(list('abcde')) >>> s.cat.as_ordered() >>> s.cat.as_unordered() - """ def __init__(self, data): diff --git a/pandas/core/arrays/datetimes.py b/pandas/core/arrays/datetimes.py index a6f688fb0cf7a..e1104c52adf08 100644 --- a/pandas/core/arrays/datetimes.py +++ b/pandas/core/arrays/datetimes.py @@ -746,7 +746,6 @@ def tz_localize(self, tz, ambiguous='raise', nonexistent='raise', 1 2018-10-28 02:36:00+02:00 2 2018-10-28 03:46:00+01:00 dtype: datetime64[ns, CET] - """ if errors is not None: warnings.warn("The errors argument is deprecated and will be " diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 34f25c5634d5b..e67fe9b1b85eb 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -728,7 +728,6 @@ def droplevel(self, level, axis=0): axis : {0 or 'index', 1 or 'columns'}, default 0 - Returns ------- DataFrame.droplevel() @@ -767,7 +766,6 @@ def droplevel(self, level, axis=0): 1 2 3 4 5 6 7 8 9 10 11 12 - """ labels = self._get_axis(axis) new_labels = labels.droplevel(level) @@ -1231,7 +1229,6 @@ def rename_axis(self, mapper=None, **kwargs): 2 3 30 c 1 4 40 2 5 50 - """ axes, kwargs = self._construct_axes_from_arguments((), kwargs) copy = kwargs.pop('copy', True) @@ -2072,7 +2069,6 @@ def _repr_latex_(self): automatically chosen depending on the file extension): >>> df1.to_excel('output1.xlsx', engine='xlsxwriter') - """ 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): >>> import os >>> os.remove('data.h5') - """ from pandas.io import pytables 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): MultiIndex Slicers is a generic way to get/set values on any level or levels. It is a superset of xs functionality, see :ref:`MultiIndex Slicers ` - """ axis = self._get_axis_number(axis) labels = self._get_axis(axis) @@ -4883,7 +4877,6 @@ def as_matrix(self, columns=None): If the caller is heterogeneous and contains booleans or objects, the result will be of dtype=object. See Notes. - Notes ----- 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, 2018-10-28 02:36:00+02:00 1 2018-10-28 03:46:00+01:00 2 dtype: int64 - """ if nonexistent not in ('raise', 'NaT', 'shift'): raise ValueError("The nonexistent argument must be one of 'raise'," @@ -9648,7 +9640,7 @@ def compound(self, axis=None, skipna=None, level=None): cls, 'kurt', name, name2, axis_descr, "Return unbiased kurtosis over requested axis using Fisher's " "definition of\nkurtosis (kurtosis of normal == 0.0). Normalized " - "by N-1\n", + "by N-1", nanops.nankurt) cls.kurtosis = cls.kurt cls.prod = _make_min_count_stat_function( @@ -9696,8 +9688,7 @@ def nanptp(values, axis=0, skipna=True): ``numpy.ndarray`` method ``ptp``. .. deprecated:: 0.24.0 - Use numpy.ptp instead - """, + Use numpy.ptp instead""", nanptp) @classmethod @@ -9961,7 +9952,6 @@ def _doc_parms(cls): _num_doc = """ - %(desc)s Parameters @@ -9979,12 +9969,11 @@ def _doc_parms(cls): Returns ------- -%(outname)s : %(name1)s or %(name2)s (if level specified) +%(outname)s : %(name1)s or %(name2)s (if level specified)\ %(examples)s""" _num_ddof_doc = """ - %(desc)s Parameters diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index 0c6aaf4b46d6a..153d384098aad 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -1405,7 +1405,6 @@ class _IXIndexer(_NDFrameIndexer): usually better to be explicit and use ``.iloc`` or ``.loc``. See more at :ref:`Advanced Indexing `. - """ def __init__(self, name, obj): diff --git a/pandas/core/strings.py b/pandas/core/strings.py index a12605aaed554..23607fb44c1b1 100644 --- a/pandas/core/strings.py +++ b/pandas/core/strings.py @@ -475,7 +475,6 @@ def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True): A copy of the object with all matching occurrences of `pat` replaced by `repl`. - Raises ------ ValueError @@ -549,7 +548,6 @@ def str_replace(arr, pat, repl, n=-1, case=None, flags=0, regex=True): 1 bar 2 NaN dtype: object - """ # 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): contains : analogous, but less strict, relying on re.search instead of re.match extract : extract matched groups - """ if not case: flags |= re.IGNORECASE @@ -1177,7 +1174,6 @@ def str_findall(arr, pat, flags=0): 1 [] 2 [b, b] dtype: object - """ regex = re.compile(pat, flags=flags) return _na_map(regex.findall, arr) @@ -2433,7 +2429,6 @@ def rsplit(self, pat=None, n=-1, expand=False): Examples -------- - >>> s = pd.Series(['Linda van der Berg', 'George Pitt-Rivers']) >>> s 0 Linda van der Berg diff --git a/pandas/core/window.py b/pandas/core/window.py index be28a3bcccec6..31146c4e8836a 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -547,7 +547,6 @@ class Window(_Window): 2013-01-01 09:00:05 NaN 2013-01-01 09:00:06 4.0 - Contrasting to an integer rolling window, this will roll a variable length window corresponding to the time period. The default for min_periods is 1. diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 405c534e8528b..bce14915682b8 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -2460,7 +2460,6 @@ def hist_series(self, by=None, ax=None, grid=True, xlabelsize=None, See Also -------- matplotlib.axes.Axes.hist : Plot a histogram using matplotlib. - """ import matplotlib.pyplot as plt