Skip to content

ENH: multi slice in loc #62659

@tocr83

Description

@tocr83

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I wish iloc and loc directly could allow multislicing that is not contiguous, like when using iloc combined with np.r_

Feature Description

Allow lists to be parameters in iloc and loc, that today can be performed with np.r_

Like df.iloc[[1, 2:5, 8, -1], [:3, 5:7, -2:]]

Alternative Solutions

Df.iloc[np.r_[:2, 5:8], np.r_[3, 4:6, -2]]

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNeeds TriageIssue that has not been reviewed by a pandas team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions