diff --git a/pandas/_libs/interval.pyx b/pandas/_libs/interval.pyx index 1a712d0c4efa8..b13ce7c294f37 100644 --- a/pandas/_libs/interval.pyx +++ b/pandas/_libs/interval.pyx @@ -94,7 +94,7 @@ cdef class IntervalMixin: @property def mid(self): """ - Return the midpoint of the Interval + Return the midpoint of the Interval. """ try: return 0.5 * (self.left + self.right) @@ -104,7 +104,9 @@ cdef class IntervalMixin: @property def length(self): - """Return the length of the Interval""" + """ + Return the length of the Interval. + """ return self.right - self.left @property @@ -283,15 +285,19 @@ cdef class Interval(IntervalMixin): _typ = "interval" cdef readonly object left - """Left bound for the interval""" + """ + Left bound for the interval. + """ cdef readonly object right - """Right bound for the interval""" + """ + Right bound for the interval. + """ cdef readonly str closed """ Whether the interval is closed on the left-side, right-side, both or - neither + neither. """ def __init__(self, left, right, str closed='right'): diff --git a/pandas/_libs/tslibs/nattype.pyx b/pandas/_libs/tslibs/nattype.pyx index 0bd4b78d51e4e..241aff0e19112 100644 --- a/pandas/_libs/tslibs/nattype.pyx +++ b/pandas/_libs/tslibs/nattype.pyx @@ -464,7 +464,7 @@ class NaTType(_NaT): """ Timestamp.combine(date, time) - date, time -> datetime with same date and time fields + date, time -> datetime with same date and time fields. """ ) utcnow = _make_error_func('utcnow', # noqa:E128 @@ -503,8 +503,8 @@ class NaTType(_NaT): """ Timestamp.fromordinal(ordinal, freq=None, tz=None) - passed an ordinal, translate and convert to a ts - note: by definition there cannot be any tz info on the ordinal itself + Passed an ordinal, translate and convert to a ts. + Note: by definition there cannot be any tz info on the ordinal itself. Parameters ---------- diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index aed64aff14e0a..e297d11c5144d 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -2244,7 +2244,7 @@ cdef class _Period: containing one or several directives. The method recognizes the same directives as the :func:`time.strftime` function of the standard Python distribution, as well as the specific additional directives ``%f``, - ``%F``, ``%q``. (formatting & docs originally from scikits.timeries) + ``%F``, ``%q``. (formatting & docs originally from scikits.timeries). +-----------+--------------------------------+-------+ | Directive | Meaning | Notes | diff --git a/pandas/_libs/tslibs/timestamps.pyx b/pandas/_libs/tslibs/timestamps.pyx index 50a71d062c63f..317dc769636fb 100644 --- a/pandas/_libs/tslibs/timestamps.pyx +++ b/pandas/_libs/tslibs/timestamps.pyx @@ -242,8 +242,8 @@ class Timestamp(_Timestamp): """ Timestamp.fromordinal(ordinal, freq=None, tz=None) - passed an ordinal, translate and convert to a ts - note: by definition there cannot be any tz info on the ordinal itself + Passed an ordinal, translate and convert to a ts. + Note: by definition there cannot be any tz info on the ordinal itself. Parameters ---------- @@ -333,7 +333,7 @@ class Timestamp(_Timestamp): """ Timestamp.combine(date, time) - date, time -> datetime with same date and time fields + date, time -> datetime with same date and time fields. """ return cls(datetime.combine(date, time)) @@ -601,7 +601,7 @@ timedelta}, default 'raise' @property def dayofweek(self): """ - Return day of whe week. + Return day of the week. """ return self.weekday()