title: What is wrong with adding a row to pandas dataframe like this?
body: <p>I am creating a simple dataframe like the following. </p>
  
  <pre><code>cache_df = pd.DataFrame(columns=['ticker', 'maturity', 'rate', 'datetime'])
  cache_df = cache_df.set_index(['ticker', 'maturity'])
  </code></pre>
  
  <p>When I try to add a row, i am getting an error that i couldnt wrap my mind around. Can anyone help me understand why?</p>
  
  <pre><code>cache_df.loc[symbolName, expiry] = [rate, updateTime]
  </code></pre>
  
  <p>I got </p>
  
  <blockquote>
    <p>ValueError: cannot set using a multi-index selection indexer with a
    different length than the value</p>
  </blockquote>
  
  <p>and my dataframe looks strange after the error message.</p>
  
  <pre><code>Out[106]: 
                  rate datetime  2016-11-18 00:00:00
  ticker maturity                                   
  GECC             NaN      NaN                  NaN
  </code></pre>
  
  <p>if I do </p>
  
  <pre><code>cache_df.loc[[1,2]] = [3,4]
  </code></pre>
  
  <p>I get a different error:</p>
  
  <blockquote>
    <p>ValueError: zero-size array to reduction operation maximum which has
    no identity</p>
  </blockquote>