<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def gen():
    yield '1','2',1,2
    yield '1','2',1,2
    yield '1','3',3,2
    yield '2','4',1,2

ser = pd.DataFrame(gen(), columns=[&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;,]).set_index([&quot;a&quot;, &quot;b&quot;])[&quot;c&quot;]
print ser

print ser.loc[('1','3')]
print ser.at[('1','3')]  # TypeError: _get_value() got multiple values for keyword argument 'takeable'"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">gen</span>():
    <span class="pl-k">yield</span> <span class="pl-s">'1'</span>,<span class="pl-s">'2'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>
    <span class="pl-k">yield</span> <span class="pl-s">'1'</span>,<span class="pl-s">'2'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>
    <span class="pl-k">yield</span> <span class="pl-s">'1'</span>,<span class="pl-s">'3'</span>,<span class="pl-c1">3</span>,<span class="pl-c1">2</span>
    <span class="pl-k">yield</span> <span class="pl-s">'2'</span>,<span class="pl-s">'4'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>

<span class="pl-s1">ser</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-en">gen</span>(), <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>, <span class="pl-s">"c"</span>, <span class="pl-s">"d"</span>,]).<span class="pl-en">set_index</span>([<span class="pl-s">"a"</span>, <span class="pl-s">"b"</span>])[<span class="pl-s">"c"</span>]
<span class="pl-k">print</span> <span class="pl-s1">ser</span>

<span class="pl-k">print</span> <span class="pl-s1">ser</span>.<span class="pl-s1">loc</span>[(<span class="pl-s">'1'</span>,<span class="pl-s">'3'</span>)]
<span class="pl-k">print</span> <span class="pl-s1">ser</span>.<span class="pl-s1">at</span>[(<span class="pl-s">'1'</span>,<span class="pl-s">'3'</span>)]  <span class="pl-c"># TypeError: _get_value() got multiple values for keyword argument 'takeable'</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The <code class="notranslate">.at</code> accessor should return the indexed value <code class="notranslate">3</code>.</p>
<p dir="auto">There doesn't seem any way reliably look up a single scalar in a multiindex. If this is not supported, a better error would be appreciated.</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto"><code class="notranslate">3</code></p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 2.7.6.final.0<br>
python-bits: 64<br>
OS: Linux<br>
OS-release: 3.13.0-24-generic<br>
machine: x86_64<br>
processor: x86_64<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_US.UTF-8<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.22.0<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 36.0.1<br>
Cython: 0.27.3<br>
numpy: 1.14.0<br>
scipy: 1.0.0<br>
pyarrow: None<br>
xarray: None<br>
IPython: 5.3.0<br>
sphinx: None<br>
patsy: 0.2.1<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: None<br>
tables: 3.1.1<br>
numexpr: 2.6.2<br>
feather: None<br>
matplotlib: 2.0.2<br>
openpyxl: 1.7.0<br>
xlrd: 0.9.2<br>
xlwt: 0.7.5<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 0.999999999<br>
sqlalchemy: 1.0.15<br>
pymysql: None<br>
psycopg2: 2.7.3.2 (dt dec pq3 ext lo64)<br>
jinja2: 2.9.6<br>
s3fs: None<br>
fastparquet: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>
<p dir="auto">Split off from: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54338376" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9250" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9250/hovercard" href="https://github.com/pandas-dev/pandas/issues/9250">#9250</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [6]:

# Dataframe now:

cols = [('a_col', chr(i+65)) for i in range(5)]
cols.extend([('b_col', chr(i+65)) for i in range(5, 10)])

idx = [('a_row', chr(i+65)) for i in range(5)]
idx.extend([('b_row', chr(i+65)) for i in range(5, 10)])

df = pd.DataFrame(np.linspace(1, 100, 100).reshape(10, 10),
                  index = pd.MultiIndex.from_tuples(idx),
                  columns = pd.MultiIndex.from_tuples(cols))

In [7]:

df
Out[7]:
a_col   b_col
A   B   C   D   E   F   G   H   I   J
a_row   A   1   2   3   4   5   6   7   8   9   10
B   11  12  13  14  15  16  17  18  19  20
C   21  22  23  24  25  26  27  28  29  30
D   31  32  33  34  35  36  37  38  39  40
E   41  42  43  44  45  46  47  48  49  50
b_row   F   51  52  53  54  55  56  57  58  59  60
G   61  62  63  64  65  66  67  68  69  70
H   71  72  73  74  75  76  77  78  79  80
I   81  82  83  84  85  86  87  88  89  90
J   91  92  93  94  95  96  97  98  99  100
In [8]:

df.loc[('a_row', 'A')] # Works
df.loc[:, ('a_col', 'A')] # Works
df.ix[('a_row', 'B')] # Works
Out[8]:
a_col  A    11
       B    12
       C    13
       D    14
       E    15
b_col  F    16
       G    17
       H    18
       I    19
       J    20
Name: (a_row, B), dtype: float64
In [9]:

df.at[('a_row', 'A')] # fails
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
&lt;ipython-input-9-6b9462dd2fc9&gt; in &lt;module&gt;()
----&gt; 1 df.at[('a_row', 'A')] # fails

/home/federico/Python_Libraries/pandas/pandas/core/indexing.pyc in __getitem__(self, key)
   1505 
   1506         key = self._convert_key(key)
-&gt; 1507         return self.obj.get_value(*key, takeable=self._takeable)
   1508 
   1509     def __setitem__(self, key, value):

/home/federico/Python_Libraries/pandas/pandas/core/frame.pyc in get_value(self, index, col, takeable)
   1640             return _maybe_box_datetimelike(series.values[index])
   1641 
-&gt; 1642         series = self._get_item_cache(col)
   1643         engine = self.index._engine
   1644         return engine.get_value(series.get_values(), index)

/home/federico/Python_Libraries/pandas/pandas/core/generic.pyc in _get_item_cache(self, item)
   1066         res = cache.get(item)
   1067         if res is None:
-&gt; 1068             values = self._data.get(item)
   1069             res = self._box_item_values(item, values)
   1070             cache[item] = res

/home/federico/Python_Libraries/pandas/pandas/core/internals.pyc in get(self, item, fastpath)
   2847 
   2848             if not isnull(item):
-&gt; 2849                 loc = self.items.get_loc(item)
   2850             else:
   2851                 indexer = np.arange(len(self.items))[isnull(self.items)]

/home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key)
   4123 
   4124         if not isinstance(key, tuple):
-&gt; 4125             loc = self._get_level_indexer(key, level=0)
   4126             return _maybe_to_slice(loc)
   4127 

/home/federico/Python_Libraries/pandas/pandas/core/index.pyc in _get_level_indexer(self, key, level)
   4359         else:
   4360 
-&gt; 4361             loc = level_index.get_loc(key)
   4362             if level &gt; 0 or self.lexsort_depth == 0:
   4363                 return np.array(labels == loc,dtype=bool)

/home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key)
   1405         loc : int if unique index, possibly slice or mask if not
   1406         &quot;&quot;&quot;
-&gt; 1407         return self._engine.get_loc(_values_from_object(key))
   1408 
   1409     def get_value(self, series, key):

/home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3812)()

/home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3692)()

/home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12318)()

/home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12269)()

KeyError: 'A'"><pre class="notranslate"><code class="notranslate">In [6]:

# Dataframe now:

cols = [('a_col', chr(i+65)) for i in range(5)]
cols.extend([('b_col', chr(i+65)) for i in range(5, 10)])

idx = [('a_row', chr(i+65)) for i in range(5)]
idx.extend([('b_row', chr(i+65)) for i in range(5, 10)])

df = pd.DataFrame(np.linspace(1, 100, 100).reshape(10, 10),
                  index = pd.MultiIndex.from_tuples(idx),
                  columns = pd.MultiIndex.from_tuples(cols))

In [7]:

df
Out[7]:
a_col   b_col
A   B   C   D   E   F   G   H   I   J
a_row   A   1   2   3   4   5   6   7   8   9   10
B   11  12  13  14  15  16  17  18  19  20
C   21  22  23  24  25  26  27  28  29  30
D   31  32  33  34  35  36  37  38  39  40
E   41  42  43  44  45  46  47  48  49  50
b_row   F   51  52  53  54  55  56  57  58  59  60
G   61  62  63  64  65  66  67  68  69  70
H   71  72  73  74  75  76  77  78  79  80
I   81  82  83  84  85  86  87  88  89  90
J   91  92  93  94  95  96  97  98  99  100
In [8]:

df.loc[('a_row', 'A')] # Works
df.loc[:, ('a_col', 'A')] # Works
df.ix[('a_row', 'B')] # Works
Out[8]:
a_col  A    11
       B    12
       C    13
       D    14
       E    15
b_col  F    16
       G    17
       H    18
       I    19
       J    20
Name: (a_row, B), dtype: float64
In [9]:

df.at[('a_row', 'A')] # fails
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
&lt;ipython-input-9-6b9462dd2fc9&gt; in &lt;module&gt;()
----&gt; 1 df.at[('a_row', 'A')] # fails

/home/federico/Python_Libraries/pandas/pandas/core/indexing.pyc in __getitem__(self, key)
   1505 
   1506         key = self._convert_key(key)
-&gt; 1507         return self.obj.get_value(*key, takeable=self._takeable)
   1508 
   1509     def __setitem__(self, key, value):

/home/federico/Python_Libraries/pandas/pandas/core/frame.pyc in get_value(self, index, col, takeable)
   1640             return _maybe_box_datetimelike(series.values[index])
   1641 
-&gt; 1642         series = self._get_item_cache(col)
   1643         engine = self.index._engine
   1644         return engine.get_value(series.get_values(), index)

/home/federico/Python_Libraries/pandas/pandas/core/generic.pyc in _get_item_cache(self, item)
   1066         res = cache.get(item)
   1067         if res is None:
-&gt; 1068             values = self._data.get(item)
   1069             res = self._box_item_values(item, values)
   1070             cache[item] = res

/home/federico/Python_Libraries/pandas/pandas/core/internals.pyc in get(self, item, fastpath)
   2847 
   2848             if not isnull(item):
-&gt; 2849                 loc = self.items.get_loc(item)
   2850             else:
   2851                 indexer = np.arange(len(self.items))[isnull(self.items)]

/home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key)
   4123 
   4124         if not isinstance(key, tuple):
-&gt; 4125             loc = self._get_level_indexer(key, level=0)
   4126             return _maybe_to_slice(loc)
   4127 

/home/federico/Python_Libraries/pandas/pandas/core/index.pyc in _get_level_indexer(self, key, level)
   4359         else:
   4360 
-&gt; 4361             loc = level_index.get_loc(key)
   4362             if level &gt; 0 or self.lexsort_depth == 0:
   4363                 return np.array(labels == loc,dtype=bool)

/home/federico/Python_Libraries/pandas/pandas/core/index.pyc in get_loc(self, key)
   1405         loc : int if unique index, possibly slice or mask if not
   1406         """
-&gt; 1407         return self._engine.get_loc(_values_from_object(key))
   1408 
   1409     def get_value(self, series, key):

/home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3812)()

/home/federico/Python_Libraries/pandas/pandas/index.so in pandas.index.IndexEngine.get_loc (pandas/index.c:3692)()

/home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12318)()

/home/federico/Python_Libraries/pandas/pandas/hashtable.so in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12269)()

KeyError: 'A'
</code></pre></div>
<p dir="auto">It also fails on Series with multi-indexing.</p>