Skip to content

No str for FY5253Quarter #12379

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

Open
cancan101 opened this issue Feb 18, 2016 · 3 comments
Open

No str for FY5253Quarter #12379

cancan101 opened this issue Feb 18, 2016 · 3 comments
Labels
Bug Frequency DateOffsets

Comments

@cancan101
Copy link
Contributor

cancan101 commented Feb 18, 2016

from pandas.tseries.offsets import FY5253Quarter

offset_fyq = FY5253Quarter(weekday=6, startingMonth=12,
                       variation="last", qtr_with_extra_week=4)

str(pd.Period("2011-1-2", freq=offset_fyq))
ValueError                                Traceback (most recent call last)
<ipython-input-1-b92e5a634df4> in <module>()
      5                        variation="last", qtr_with_extra_week=4)
      6 
----> 7 str(Period("2011-1-2", freq=offset_fyq))

pandas/src/period.pyx in pandas._period.Period.__init__ (pandas/src/period.c:12139)()

/Users/alex/.virtualenvs/work/lib/python2.7/site-packages/pandas/tseries/frequencies.pyc in get_freq_code(freqstr)
    253             # e.g., freqstr = ('T', 5)
    254             try:
--> 255                 code = _period_str_to_code(freqstr[0])
    256                 stride = freqstr[1]
    257             except:

/Users/alex/.virtualenvs/work/lib/python2.7/site-packages/pandas/tseries/frequencies.pyc in _period_str_to_code(freqstr)
    809                           FutureWarning, stacklevel=3)
    810         except KeyError:
--> 811             raise ValueError("Unknown freqstr: %s" % freqstr)
    812 
    813         return _period_code_map[alias]

ValueError: Unknown freqstr: REQ-L-DEC-SAT-4

Expected: '2010Q4'.

See for more tests: https://github.com/pydata/pandas/pull/5148/files#diff-f9b276c4aa39a6161726d8b43ce62516R2420

@jreback jreback added this to the Next Major Release milestone Feb 18, 2016
@jreback
Copy link
Contributor

jreback commented Feb 18, 2016

this is the issue for #12377

@sinhrks
Copy link
Member

sinhrks commented Mar 6, 2016

Is it correct it never worked before, and the same as #4878?

@jreback
Copy link
Contributor

jreback commented Mar 6, 2016

this never worked before
it might be the same issue u have pointed idk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frequency DateOffsets
Projects
None yet
Development

No branches or pull requests

5 participants