Skip to content

DOC: Clean dubious docstring #50484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 29, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,22 @@ class ApplyTypeError(TypeError):
cdef class BaseOffset:
"""
Base class for DateOffset methods that are not overridden by subclasses.

Parameters:
-----------
n : int
Number of multiples of the frequency.

normalize : boolean
Whether the frequency can align with midnight.

Examples
--------
>>> pd.offsets.Hour(5).n
5

>>> pd.offsets.Hour(5).normalize
False
"""
# ensure that reversed-ops with numpy scalars return NotImplemented
__array_priority__ = 1000
Expand All @@ -384,23 +400,7 @@ cdef class BaseOffset:
def __init__(self, n=1, normalize=False):
n = self._validate_n(n)
self.n = n
"""
Number of multiples of the frequency.

Examples
--------
>>> pd.offsets.Hour(5).n
5
"""
self.normalize = normalize
"""
Return boolean whether the frequency can align with midnight.

Examples
--------
>>> pd.offsets.Hour(5).normalize
False
"""
self._cache = {}

def __eq__(self, other) -> bool:
Expand Down