Skip to content

BUG: duplicate indexed assignement #6541

Closed
@jreback

Description

@jreback

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions