Skip to content

API Should Index be made opt-in? #48880

Closed
@MarcoGorelli

Description

@MarcoGorelli

One of the points raised in pandas standardisation doc, in the context of the Consortium for Python Data API Standards, is about making indices opt-in

I've started putting together a write-up on this: https://hackmd.io/@mntOORP3TCesJJyvg-IdFQ/B1EqHfQfo

TLDR: the suggestion is to have a DefaultIndex which would always go from 0 to the length of the DataFrame, and then loc and iloc would be aligned. I think this'd be too big of a breaking change in pandas, and that there'd be a serious risk of silently ruining people's analyses/models. I'd be open to either introducing DefaultIndex but not have it be the default, or to make it the default but not give it a loc method

Metadata

Metadata

Assignees

No one assigned

    Labels

    API DesignIndexRelated to the Index class or subclassesNeeds DiscussionRequires discussion from core team before further action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions