title: Pandas error "***ValueError: Length mismatch: Expected axis has 0 elements, new values have..."
body: <p>I am getting an error when accessing data within a Pandas DataFrame <em>df</em>:</p>
  
  <pre><code>ipdb&gt; df.loc[1988, 'ATTEND']
  *** ValueError: Length mismatch: Expected axis has 0 elements, new values have 1481 elements
  </code></pre>
  
  <p>1988 and 'ATTEND' are both in <em>df</em>:</p>
  
  <pre><code>ipdb&gt; 1988 in df.index
  True
  ipdb&gt; 'ATTEND' in df.columns
  True
  </code></pre>
  
  <p>I have no idea what this error is about. Any thoughts?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Example:</p>
  
  <pre><code>ipdb&gt; df.iloc[21875:21880, 277:280]
        FUND  ATTEND  MAATTEND
  1988     3       1         4
  1988     2       3         0
  1988     2       2         2
  1988     2       2         7
  1988     2       3         2
  
  ipdb&gt; df.loc[1988, 'ATTEND']
  *** ValueError: Length mismatch: Expected axis has 0 elements, new values have 1481 elements
  
  
  GSSFilename = 'GSS Dataset/GSS7212_R2_copy.sav'
  data = srw.SavReader(pathToData + GSSFilename)
  df = pd.DataFrame(data.all(), index=data[:,0],    columns=ALL_VARIABLE_NAMES)
  with data: 
      data = np.array(data.all()) 
  </code></pre>
  
  <p><strong>UPDATE</strong>:
  I think this problem was caused by two different Python instances accessing the same .sav file.</p>