pydata/pandas — pull request #4148 by jreback (2013-07-06 13:03:12+00:00)
Title: BUG: (GH4145/4146) Fixed bugs in multi-index selection with column multi index duplicates

closes #4145, #4146

```
In [1]: data = """h1 main h3 sub h5
...: 0 a A 1 A1 1
...: 1 b B 2 B1 2
...: 2 c B 3 A1 3
...: 3 d A 4 B2 4
...: 4 e A 5 B2 5
...: 5 f B 6 A2 6"""

In [2]: df = pd.read_csv(StringIO(data),sep='\s+',index_col=0)

In [3]: df2 = df.set_index(['main', 'sub']).T.sort_index(1)

In [4]: df2.loc[:,('A','A1')]
Out[4]:
main A
sub A1
h1 a
h3 1
h5 1

In [5]: df2[('A','A1')]
Out[5]:
main A
sub A1
h1 a
h3 1
h5 1

In [6]: df2['A']['A1']
Out[6]:
A1
h1 a
h3 1
h5 1
```