Issue 1:
Code Sample, a copy-pastable example if possible

df = pd.DataFrame({"a" : [0,1,2], "b" : [1,2,3]})

df[["a", "a"]].apply(lambda x: x[0] + x[1], axis = 1)

Expected Output

0 0

1 2

2 4

dtype: int64

output of pd.show_versions()

Traceback (most recent call last):

File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\indexes\base.py", line 1980, in get_value

tz=getattr(series.dtype, 'tz', None))

File "pandas\index.pyx", line 103, in pandas.index.IndexEngine.get_value (pandas\index.c:3332)

File "pandas\index.pyx", line 111, in pandas.index.IndexEngine.get_value (pandas\index.c:3035)

File "pandas\index.pyx", line 154, in pandas.index.IndexEngine.get_loc (pandas\index.c:3955)

File "pandas\index.pyx", line 169, in pandas.index.IndexEngine._get_loc_duplicates (pandas\index.c:4236)

TypeError: unorderable types: str() > int()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in

File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\core\frame.py", line 4061, in apply

return self._apply_standard(f, axis, reduce=reduce)

File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\core\frame.py", line 4157, in _apply_standard

results[i] = func(v)

File "", line 1, in

File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\core\series.py", line 583, in getitem

result = self.index.get_value(self, key)

File "C:\Users\Alexander\Anaconda3\lib\site-packages\pandas\indexes\base.py", line 2000, in get_value

raise IndexError(key)

IndexError: (0, 'occurred at index 0')

This is the error I get when running on Python 3.5.1/Pandas 0.18.1 on Windows. I get the expected output on Linux running Python 2.7.11/Pandas 0.18.1.

Issue 2:
The last line of the following code snippet does not work, while it seems it should. Am I overlooking something?

df = pd.DataFrame(np.random.randn(9,2), index=[1,1,1,2,2,2,3,3,3], columns=['a', 'b'])
df
df.loc[[1, 2]] # works
df.loc[:,['a', 'b']] # works
df.loc[[1, 2], ['a', 'b']] # does not work

You don't have this with an index without duplicates.

In [1]: df = pd.DataFrame(np.random.randn(9,2), index=[1,1,1,2,2,2,3,3,3], colum
ns=['a', 'b'])

In [2]: df
Out[2]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
3 -0.520348 1.126233
3 0.232261 -0.075287
3 -0.314570 -2.635400

[9 rows x 2 columns]

In [3]: df.loc[[1, 2]]
Out[3]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184

[6 rows x 2 columns]

In [4]: df.loc[:,['a', 'b']]
Out[4]:
a b
1 0.714735 -1.125141
1 0.061066 -0.737312
1 0.269988 1.434862
2 0.336829 1.040681
2 0.929521 -1.142978
2 0.272813 -0.370184
3 -0.520348 1.126233
3 0.232261 -0.075287
3 -0.314570 -2.635400

[9 rows x 2 columns]

In [5]: df.loc[[1, 2], ['a', 'b']]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-5-617013ef905a> in <module>()
----> 1 df.loc[[1, 2], ['a', 'b']]

c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in __getitem__(sel
f, key)
1152 def __getitem__(self, key):
1153 if type(key) is tuple:
-> 1154 return self._getitem_tuple(key)
1155 else:
1156 return self._getitem_axis(key, axis=0)

c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in _getitem_tuple(
self, tup)
680 # ugly hack for GH #836
681 if self._multi_take_opportunity(tup):
--> 682 return self._multi_take(tup)
683
684 # no shortcut needed

c:\users\vdbosscj\scipy\pandas-joris\pandas\core\indexing.pyc in _multi_take(sel
f, tup)
726 return o.reindex(**d)
727 except:
--> 728 raise self._exception
729
730 def _convert_for_reindex(self, key, axis=0):

KeyError: