Skip to content

support Ellipsis (...) in pandas indexing #10956

Closed
@shoyer

Description

@shoyer

Indexing like x[..., 0] is a convenient way to indexing the last dimension of an array with NumPy. ... gets turned into an Ellipsis object, which NumPy expands to the appropriate number of full slice objects.

It would be nice to support this in pandas, too. Currently, attempting to do this throws KeyError:

>>> df[...]
KeyError: Ellipsis

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions