pydata/pandas — pull request #6256 by jreback (2014-02-04 19:36:49+00:00)
Title: BUG: Indexing bugs with reordered indexes (GH6252, GH6254)

closes #6252
closes #6254

```
In [1]: df = DataFrame(index=[3, 5, 4], columns=['A'])

In [2]: df.loc[[4, 3, 5], 'A'] = [1, 2, 3]

In [3]: df
Out[3]:
A
3 2
5 3
4 1

[3 rows x 1 columns]
```

```
In [4]: keys1 = ['@' + str(i) for i in range(5)]

In [5]: val1 = np.arange(5)

In [6]: keys2 = ['@' + str(i) for i in range(4)]

In [7]: val2 = np.arange(4)

In [8]: index = list(set(keys1).union(keys2))

In [9]: df = DataFrame(index = index)

In [10]: df['A'] = nan

In [11]: df.loc[keys1, 'A'] = val1

In [12]: df['B'] = nan

In [13]: df.loc[keys2, 'B'] = val2

In [14]: df
Out[14]:
A B
@2 2 2
@3 3 3
@0 0 0
@1 1 1
@4 4 NaN

[5 rows x 2 columns]
```