Skip to content

Day(normalize=True) gives ValueError: Tick offset with normalize=True are not allowed. #21633

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

Closed
jorisvandenbossche opened this issue Jun 26, 2018 · 3 comments
Milestone

Comments

@jorisvandenbossche
Copy link
Member

This is breaking on master (from doc build):

In [12]: from pandas.tseries.offsets import Day

In [13]: Day(normalize=True)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-13-6b717dce6fa8> in <module>()
----> 1 Day(normalize=True)

~/scipy/pandas/pandas/tseries/offsets.py in __init__(self, n, normalize)
   2167 
   2168     def __init__(self, n=1, normalize=False):
-> 2169         BaseOffset.__init__(self, n, normalize)
   2170         if normalize:
   2171             raise ValueError("Tick offset with `normalize=True` are not "

ValueError: Tick offset with `normalize=True` are not allowed.
@jorisvandenbossche jorisvandenbossche added this to the 0.24.0 milestone Jun 26, 2018
@jorisvandenbossche
Copy link
Member Author

jorisvandenbossche commented Jun 26, 2018

OK, I see this was done in #21427. In any case, all occurences of this in the docs should be fixed.

But, if this change is needed, it would also be nice if there is a clear alternative provided in the documentation / deprecation message.
And I think we should maybe also consider deprecating this instead of simply changing.

cc @jbrockmendel

@jreback
Copy link
Contributor

jreback commented Jun 26, 2018

we have #21564 already for this tracking

@jreback jreback closed this as completed Jun 26, 2018
@jorisvandenbossche
Copy link
Member Author

Whoops, sorry

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

No branches or pull requests

2 participants