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

BUG: Fixed an issue with a duplicate index and duplicate selector with loc (GH4825) #4833

Merged
merged 1 commit into from
Sep 16, 2013

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Sep 13, 2013

closes #4825

In [1]: ser = Series([0.1, 0.2], index=[1, 2])

In [3]: ser
Out[3]: 
1    0.1
2    0.2
dtype: float64

In [4]: ser.loc[[3, 2, 3]]
Out[4]: 
3    NaN
2    0.2
3    NaN
dtype: float64

In [5]: ser.loc[[3, 3, 3]]
Out[5]: 
3   NaN
3   NaN
3   NaN
dtype: float64

In [6]: ser.loc[[2, 2, 3]]
Out[6]: 
2    0.2
2    0.2
3    NaN
dtype: float64

In [7]: ser.iloc[[1,1,0,0]]
Out[7]: 
2    0.2
2    0.2
1    0.1
1    0.1
dtype: float64

jreback added a commit that referenced this pull request Sep 16, 2013
BUG: Fixed an issue with a duplicate index and duplicate selector with loc (GH4825)
@jreback jreback merged commit 3653994 into pandas-dev:master Sep 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug or unhelpful error message in 0.12 and trunk: IndexError: Out of bounds on buffer access (axis 0)
1 participant