Skip to content

AssertionError with df.resample(how="median") #1688

@eloraburns

Description

@eloraburns

I've reproduced something using how="median", perhaps #1648. It seems to hit when there are discontinuities in the resampling (i.e. minutes with no records when downsampling).

Both pandas 0.8.1 and 0.8.2.dev-f5a74d4 don't like it:

import pandas as pd
from datetime import datetime
df = pd.DataFrame([1, 2], index=[datetime(2012,1,1,0,0,0), datetime(2012,1,1,0,5,0)])
df.resample("T", how="median")
# Throws AssertionError

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