Skip to content

YearOffset() raises AttributeError #7706

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

From #7375 (comment):
related: #4804
xref: #7705 (MonthOffset)

In [55]: offsets.YearOffset()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-55-b53e59b753d1> in <module>()
----> 1 offsets.YearOffset()

c:\users\vdbosscj\scipy\pandas-joris\pandas\tseries\offsets.pyc in __init__(self
, n, normalize, **kwds)
   1331
   1332     def __init__(self, n=1, normalize=False, **kwds):
-> 1333         self.month = kwds.get('month', self._default_month)
   1334
   1335         if self.month < 1 or self.month > 12:

AttributeError: 'YearOffset' object has no attribute '_default_month'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions