title: Unpack a list outside of a function for pandas DataFrame multi-index
body: <p>I want to add a multi-index column to an existing pandas dataframe <code>df</code>. An example: </p>
  
  <pre><code>d = {('a','b'):[1,2,3], ('c', 'd'): [4,5,6]}
  df = pd.DataFrame(d)
  </code></pre>
  
  <p>The resulting dataframe is: </p>
  
  <pre><code>   a  c 
     b  d 
  0  1  4 
  1  2  5 
  2  3  6 
  </code></pre>
  
  <p>Now I want to add a new column to the dataframe. The correct way to do that would be to use <code>df['e', 'f'] = [7,8,9]</code>. However, I would like to use the list <code>new_key</code> as the key. Normally I could use the asterisk <code>*</code>, but apparently it cannot be used outside of functions. So I get the following errors. </p>
  
  <pre><code>new_key = ['e','f']
  
  df[new_key] = [7,8,9]
  &gt; KeyError: "['e' 'f'] not in index"
  
  df[*new_key] = [7,8,9]
  &gt; SyntaxError: invalid syntax 
  </code></pre>
  
  <p>Does anyone know how to solve this?</p>