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/6254 below:

assigning using df.loc and unsorted labels doesn't put values in the right places · Issue #6254 · pandas-dev/pandas · GitHub

Using 0.13.1 (gohlke binaries, Win64, using numpy 1.8):

When using .loc, when passing unsorted labels, pandas doesn't assign the values in the designed labels' locations. Example:
df = pandas.DataFrame(index=[3, 5, 4], columns=['A'])
df.loc[[4, 3, 5], 'A'] = [1, 2, 3]
Result is:

Out[30]: 
   A
3  1
5  2
4  3

One would have expected:

Out[30]: 
   A
3  2
5  3
4  1

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