Skip to content

Buggy .ix assignment #2707

Closed
Closed
@wesm

Description

@wesm

from mailing list

1) With numeric values everywhere:

df['tt1'] = df['tt2'] = 0
df.ix[1, ['tt1', 'tt2']] = [1, 2]
print df.ix[0:2,['tt1', 'tt2']]

Output:

   tt1  tt2
0    0    0
1    1    2
2    0    0

2) With string values everywhere:

df['tt1'] = df['tt2'] = '0'
df.ix[1, ['tt1', 'tt2']] = ['1', '2']
print df.ix[0:2,['tt1', 'tt2']]

Output:

      tt1     tt2
0       0       0
1  [1, 2]  [1, 2]
2       0       0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions