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: duplicate indexed assignement #6541

Closed
jreback opened this issue Mar 4, 2014 · 0 comments · Fixed by #6542
Closed

BUG: duplicate indexed assignement #6541

jreback opened this issue Mar 4, 2014 · 0 comments · Fixed by #6542
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Mar 4, 2014

from SO: http://stackoverflow.com/questions/22178642/assignment-modification-of-values-in-an-indexed-subframe-in-pandas

data = {'me':list('rttti'),'foo': list('aaade'), 'bar': arange(5)*1.34+2, 'bar2': arange(5)*-.34+2}
df = pd.DataFrame(data).set_index('me')

df.loc['r',['bar','bar2']]*=2.0
df.loc['t','bar']*=2.5
df.loc['t',['bar','bar2']]*=2.0
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