Resample with OHLC sometimes results in series on pandas release 0.18.0.rc1 #12332

Closed
jcrist opened this Issue Feb 15, 2016 · 4 comments

Comments

Projects
None yet
2 participants
Contributor

jcrist commented Feb 15, 2016

In [1]: import pandas as pd

In [2]: index = pd.date_range('1-1-2000', '2-15-2000', freq='h')

In [3]: index = index.union(pd.date_range('4-15-2000', '5-15-2000', freq='h'))

In [4]: s = pd.Series(range(len(index)), index=index)

In [5]: a = s.loc[:'4-15-2000'].resample('30T').ohlc()

In [6]: b = s.loc[:'4-14-2000'].resample('30T').ohlc()

In [7]: a.head()
Out[7]:
                     open  high  low  close
2000-01-01 00:00:00   0.0   0.0  0.0    0.0
2000-01-01 00:30:00   NaN   NaN  NaN    NaN
2000-01-01 01:00:00   1.0   1.0  1.0    1.0
2000-01-01 01:30:00   NaN   NaN  NaN    NaN
2000-01-01 02:00:00   2.0   2.0  2.0    2.0

In [8]: b.head()
Out[8]:
2000-01-01 00:00:00    0.0
2000-01-01 00:30:00    NaN
2000-01-01 01:00:00    1.0
2000-01-01 01:30:00    NaN
2000-01-01 02:00:00    2.0
Freq: 30T, dtype: float64

In [9]: pd.__version__
Out[9]: u'0.18.0rc1'

jreback changed the title from Resample with OHLC sometimes results in series on pandas release 0.8.0.rc1 to Resample with OHLC sometimes results in series on pandas release 0.18.0.rc1 Feb 15, 2016

jreback added this to the 0.18.0 milestone Feb 15, 2016

Contributor

jreback commented Feb 15, 2016

@jcrist fixed by #12329

Contributor

jreback commented Feb 15, 2016

this was incorrectly taking an .asfreq() path

@jreback jreback added a commit to jreback/pandas that referenced this issue Feb 15, 2016

@jreback jreback BUG: resampling with a how could trigger asfreq instead
closes #12332
0d8561e
Contributor

jcrist commented Feb 15, 2016

Tested, that PR, fixes all issues for dask test suite. Thanks!

jreback closed this in cac5f8b Feb 15, 2016

Contributor

jreback commented Feb 15, 2016

@jcrist thanks!

merged to master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment