A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/7551 below:

iloc setitem indexing with list of lists · Issue #7551 · pandas-dev/pandas · GitHub

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4