Skip to content

Commit 0720b03

Browse files
authored
DOC: Clean dubious docstring (#50484)
1 parent 2899f46 commit 0720b03

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

pandas/_libs/tslibs/offsets.pyx

+15-16
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,21 @@ class ApplyTypeError(TypeError):
366366
cdef class BaseOffset:
367367
"""
368368
Base class for DateOffset methods that are not overridden by subclasses.
369+
370+
Parameters
371+
----------
372+
n : int
373+
Number of multiples of the frequency.
374+
375+
normalize : bool
376+
Whether the frequency can align with midnight.
377+
378+
Examples
379+
--------
380+
>>> pd.offsets.Hour(5).n
381+
5
382+
>>> pd.offsets.Hour(5).normalize
383+
False
369384
"""
370385
# ensure that reversed-ops with numpy scalars return NotImplemented
371386
__array_priority__ = 1000
@@ -384,23 +399,7 @@ cdef class BaseOffset:
384399
def __init__(self, n=1, normalize=False):
385400
n = self._validate_n(n)
386401
self.n = n
387-
"""
388-
Number of multiples of the frequency.
389-
390-
Examples
391-
--------
392-
>>> pd.offsets.Hour(5).n
393-
5
394-
"""
395402
self.normalize = normalize
396-
"""
397-
Return boolean whether the frequency can align with midnight.
398-
399-
Examples
400-
--------
401-
>>> pd.offsets.Hour(5).normalize
402-
False
403-
"""
404403
self._cache = {}
405404

406405
def __eq__(self, other) -> bool:

0 commit comments

Comments
 (0)