Skip to content

TST/BUG: duplicate indexing ops with a Series using where and inplace add buggy (GH4550/GH4548) #4779

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

Merged
merged 2 commits into from
Sep 9, 2013

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Sep 9, 2013

closes #4550,#4548

In [1]: s = pd.concat([Series(list(range(3))),Series(list(range(3)))])

In [2]: s
Out[2]: 
0    0
1    1
2    2
0    0
1    1
2    2
dtype: int64

In [3]: s.where(s<2)
Out[3]: 
0     0
1     1
2   NaN
0     0
1     1
2   NaN
dtype: float64

In [4]: s[s<1] = 5

In [5]: s
Out[5]: 
0    5
1    1
2    2
0    5
1    1
2    2
dtype: int64

In [6]: s[s<2] += 10

In [7]: s
Out[7]: 
0     5
1    11
2     2
0     5
1    11
2     2
dtype: int64

jreback added a commit that referenced this pull request Sep 9, 2013
TST/BUG: duplicate indexing ops with a Series using where and inplace add buggy (GH4550/GH4548)
@jreback jreback merged commit e461793 into pandas-dev:master Sep 9, 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.

'ValueError: Cannot assign nan to integer series" when calling where on Series with non-unique index.
1 participant