Skip to content

Commit

Permalink
Removed dateparseerror example from period.year
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
  • Loading branch information
uditbaliyan and mroeschke authored Aug 16, 2024
1 parent f52c610 commit cdf36b2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2076,11 +2076,6 @@ cdef class _Period(PeriodMixin):
>>> period = pd.Period('nan', 'M')
>>> period.year
nan

Period object with an invalid format:

>>> period = pd.Period('invalid', 'M')
# Will raise a DateParseError
"""
base = self._dtype._dtype_code
return pyear(self.ordinal, base)
Expand Down

0 comments on commit cdf36b2

Please sign in to comment.