Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: allow multiple indices in Index.insert #7384

Closed
sinhrks opened this issue Jun 6, 2014 · 1 comment
Closed

API: allow multiple indices in Index.insert #7384

sinhrks opened this issue Jun 6, 2014 · 1 comment
Labels
Enhancement Index Related to the Index class or subclasses

Comments

@sinhrks
Copy link
Member

sinhrks commented Jun 6, 2014

Derived from #7299. numpy.insert can accept multiple elements / indices as of v1.8.
http://docs.scipy.org/doc/numpy/reference/generated/numpy.insert.html

Allow Index to accept multiple elements / indices. Currently, it raises IndexError.

import pandas as pd
idx1 = pd.Index([1, 2, 3, 4, 5])
idx1.insert([1, 2], 0)
# IndexError: invalid slice
@jreback jreback added this to the 0.15.0 milestone Jun 14, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@toobaz toobaz added Index Related to the Index class or subclasses and removed Indexing Related to indexing on series/frames, not to indexes themselves labels Jun 28, 2019
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@mroeschke
Copy link
Member

Look to work on main and I believe we have a test for this so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Index Related to the Index class or subclasses
Projects
None yet
Development

No branches or pull requests

6 participants