Skip to content

BUG: iloc setitem indexing with list of lists #7551

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 Jun 23, 2014 · 0 comments · Fixed by #7552
Closed

BUG: iloc setitem indexing with list of lists #7551

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

Comments

@jreback
Copy link
Contributor

jreback commented Jun 23, 2014

different results when mixed vs single dtypes

In [1]: df = DataFrame(dict(A = np.arange(5), B = np.arange(5,10)))

In [2]: df
Out[2]: 
   A  B
0  0  5
1  1  6
2  2  7
3  3  8
4  4  9

In [4]: df.iloc[2:4] = [[10,11],[12,13]]

In [5]: df
Out[5]: 
    A   B
0   0   5
1   1   6
2  10  11
3  12  13
4   4   9
In [6]: df = DataFrame(dict(A = list('abcde'), B = np.arange(5,10)))

In [7]:  df.iloc[2:4] = [['x',11],['y',13]]

In [8]: df
Out[8]: 
    A   B
0   a   5
1   b   6
2   x   y
3  11  13
4   e   9
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