Skip to content

BUG: resample on PeriodIndex with 'W' causes recursion #12883

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
jreback opened this issue Apr 12, 2016 · 3 comments
Closed

BUG: resample on PeriodIndex with 'W' causes recursion #12883

jreback opened this issue Apr 12, 2016 · 3 comments
Labels
Bug Period Period data type Resample resample method

Comments

@jreback
Copy link
Contributor

jreback commented Apr 12, 2016

In [32]: s = pd.Series(range(2), pd.period_range('1/1/1990', periods=2, freq='M'))

In [33]: s
Out[33]: 
1990-01    0
1990-02    1
Freq: M, dtype: int64

In [34]: s.resample('W').asfreq()
@jreback jreback added Bug Period Period data type Resample resample method labels Apr 12, 2016
@jreback jreback added this to the Next Major Release milestone Apr 12, 2016
@jreback
Copy link
Contributor Author

jreback commented Apr 12, 2016

cc @MaximilianR

@max-sixty
Copy link
Contributor

Works after #12874 !

In [12]: pd.Series(range(2), pd.period_range('1/1/1990', periods=2, freq='M')).resample('W').asfreq()
Out[12]: 
1990-01-01/1990-01-07    0.0
1990-01-08/1990-01-14    NaN
1990-01-15/1990-01-21    NaN
1990-01-22/1990-01-28    NaN
1990-01-29/1990-02-04    1.0
1990-02-05/1990-02-11    NaN
1990-02-12/1990-02-18    NaN
1990-02-19/1990-02-25    NaN
1990-02-26/1990-03-04    NaN
Freq: W-SUN, dtype: float64

@jreback
Copy link
Contributor Author

jreback commented Apr 12, 2016

ok great!

I'll close this, but pls add as a test (unless you have something close already)

@jreback jreback closed this as completed Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Period Period data type Resample resample method
Projects
None yet
Development

No branches or pull requests

2 participants