Closed
Description
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