Skip to content

BUG: fancy setitem on a mixed-frame with a series fails #3668

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

Closed
jreback opened this issue May 21, 2013 · 0 comments · Fixed by #3670
Closed

BUG: fancy setitem on a mixed-frame with a series fails #3668

jreback opened this issue May 21, 2013 · 0 comments · Fixed by #3670
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented May 21, 2013

In [35]: df = pandas.DataFrame({'x':range(10), 'y':range(10,20),'z' : 'bar'})

In [36]: df.ix[df.x % 2 == 0, 'y'] = df.ix[df.x % 2 == 0, 'y'].values * 100

In [37]: df
Out[37]: 
   x     y    z
0  0  1000  bar
1  1    11  bar
2  2  1000  bar
3  3    13  bar
4  4  1000  bar
5  5    15  bar
6  6  1000  bar
7  7    17  bar
8  8  1000  bar
9  9    19  bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant