Skip to content
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

Resample with PeriodIndex should allow third option #1635

Closed
changhiskhan opened this issue Jul 17, 2012 · 5 comments
Closed

Resample with PeriodIndex should allow third option #1635

changhiskhan opened this issue Jul 17, 2012 · 5 comments
Labels
Bug Period Period data type Resample resample method
Milestone

Comments

@changhiskhan
Copy link
Contributor

Suppose I have:

prng = period_range('1/1/1999', freq='M', periods=3)
s = Series(np.random.randn(len(prng)), prng)

s.resample('D') should by default go from 1/1/1999 to 3/31/1999
as opposed to 1/31/1999 - 3/31/1999 ('e') or 1/1/1999-3/1/1999 ('s')

@wesm
Copy link
Member

wesm commented Jul 19, 2012

I don't see what's wrong. There are two options here, no?:

s.resample('D', convention='start')
s.resample('D', convention='end')

@changhiskhan
Copy link
Contributor Author

I was thinking the 3 monthly periods should cover January 1st to March 31st so resampling to daily period frequency should also cover the same.
convention='start' covers Jan 1st to Mar 1st
convention='end' covers Jan 31st to Mar 31st

@wesm
Copy link
Member

wesm commented Jul 19, 2012

Ah, I see. A third kind of convention. Let's push this to the next release, but shouldn't be too hard

wesm added a commit that referenced this issue Jul 21, 2012
@ghost ghost assigned changhiskhan Jul 23, 2012
yarikoptic added a commit to neurodebian/pandas that referenced this issue Sep 12, 2012
Version 0.8.1

* tag 'v0.8.1': (126 commits)
  RLS: Version 0.8.1
  DOC: tweak
  DOC: set_index/reset_index examples
  DOC: doc fixes and what's new in 0.8.1, vectorized string methods
  ENH: better string element access/slicing notation close pandas-dev#1656
  DOC: minor additions to release notes for 0.8.1
  BUG: handle Yahoo! finance returning duplicate dates for prev bus day, doc fixes
  BUG: fix windows/32-bit builds
  BUG: get pandas-dev#1620 fix working on python 3
  ENH: handling of UTF-8 strings in DataFrame columns, close pandas-dev#1620
  TST: span unit test pandas-dev#1635
  TST: skip another @network test if no internet connection
  ENH/BUG: handle tz-aware datetime.datetime in to_datetime, add utc=True option to allow conversion to utc, close pandas-dev#1581
  ENH: hack to not compress single group keys, accelerate single-key and Categorical groupby operations
  BUG: fix merge bug with left joins on length-0 DataFrame, close pandas-dev#1628
  BUG: Series.interpolate bug with method='values' and datetime64[ns], close pandas-dev#1646
  BUG: properly handle None values in dict input to concat, close pandas-dev#1649
  BUG: len-0 Series min/max/describe pandas-dev#1650
  Fix describe() failure for None and empty Series.
  BUG: string date aliases now work with tz-aware time series close pandas-dev#1647
  ...
@jreback
Copy link
Contributor

jreback commented Sep 21, 2013

looks like didn't get merged....

@jreback jreback closed this as completed Jan 3, 2014
@jreback jreback reopened this Jan 3, 2014
@jreback
Copy link
Contributor

jreback commented Mar 9, 2014

stale

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

3 participants