Skip to content

BUG: Resample on empty Period-Indexed Series returns Datetime-Indexed Series #12868

Closed
@jduncavage

Description

@jduncavage

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions