Skip to content

BUG: reindex on index in a frame using a not-None method is buggy #5669

Open
@jreback

Description

@jreback

reported here:

http://stackoverflow.com/questions/20459782/what-is-the-functionality-of-the-filling-method-when-reindexing

does not appear to be any tests for it, nor is fix that trivial

import pandas as pd
import numpy as np

hf_index = pd.date_range(start='2013-05-09 9:00', end='2013-05-13 23:59', freq='1min')
hf_prices = np.random.rand(len(hf_index))
hf = pd.DataFrame(hf_prices, index=hf_index)
hf.ix['2013-05-10 18:00':'2013-05-13 18:00',:]=np.nan
ind_daily = pd.date_range(start='2013-05-09 16:00', end='2013-05-13 16:00', freq='B')
daily1 = hf.reindex(index=ind_daily, method='ffill')

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions