BUG: Resample on empty Period-Indexed Series returns Datetime-Indexed Series · Issue #12868 · pandas-dev/pandas (original) (raw)

Code Sample, a copy-pastable example if possible

In [7]: pd.Series([], pd.period_range(start='2000', periods=0)).resample('W').mean().index Out[7]: DatetimeIndex([], dtype='datetime64[ns]', freq='W-SUN')

Expected Output

PeriodIndex([], dtype='int64', freq='W-SUN')

On pandas: 0.18.0