Skip to content

ENH?: __repr__ method for Index objects #5120

Closed
@dengemann

Description

@dengemann

It often happens that I print a MultiIndex object (whether on purpose or not) which leads to flooding my interpreter and makes it unresponsive for a couple of seconds since often the length of my indexers exceeds 500-1000k. I was thinking about adding a neat __repr__ for Indexers that summarizes levels + length or just omits what's in the middle once a certain length is exceeded. It seems this has not been tackled so far when looking at the current master, but please feel free to close this issue if this is a dupe (checked but did not find anything related). Any pointers are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    IndexingRelated to indexing on series/frames, not to indexes themselvesOutput-Formatting__repr__ of pandas objects, to_string

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions