Skip to content

NotImplementedError: method backfill not yet implemented for IntervalIndex #51503

Open
@ValueRaider

Description

@ValueRaider

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

import pandas as pd
dt = pd.Timestamp.now()
h = pd.Timedelta("1h")

# 3 simple interval ranges, with a big gap between 2nd and 3rd
intervals = pd.IntervalIndex.from_arrays([dt, dt+h, dt+10*h], [dt+h, dt+2*h, dt+11*h], closed="left")

intervals.get_indexer([dt + 5*h], method="bfill")

Expectation: the timestamp in get_indexer is mapped to the 3rd interval range, but instead this happens:

NotImplementedError: method backfill not yet implemented for IntervalIndex

Metadata

Metadata

Assignees

Labels

EnhancementIndexRelated to the Index class or subclassesIntervalInterval data type

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions