Support for indices satisfying the Index API that aren't pandas.Index subclasses #7243
Labels
API Design
Duplicate Report
Duplicate issue or pull request
Indexing
Related to indexing on series/frames, not to indexes themselves
Pandas specifies an Index API in the docs: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-internal-details
However, it's not currently possible (as far as I can tell) to create an object that can be used as a pandas Index unless it's an actual
pandas.Index
subclass.From the perspective of someone who would like to be able to create custom Index-like objects, I would prefer not to need to subclass
pandas.Index
so the implementation details of my index can be decoupled from pandas. I might still use a pandas.Index internally for speed, but in my experience composition is generally easier to reason about than inheritance.The text was updated successfully, but these errors were encountered: