title: How To Solve KeyError: “None of [Index([..], dtype='object')] are in the [columns]”/KeyError(f"None of [{key}] are in the [{axis_name}]")
body: <p>I'm a student trying to replicate the results of a paper for my class. I'm having trouble rerunning the source code and it returns this error. I'm very new to all these modules and not quite sure how to fix this even after reading this thread.
  I'm trying to run the spatial_SeqFISH_analysis.py (in Analysis/SeqFish/) and it returns this error:</p>
  <pre><code>Traceback (most recent call last):
  
    File &quot;spatial_SeqFISH_analysis.py&quot;, line 41, in &lt;module&gt;
  
      results = main()
  
    File &quot;spatial_SeqFISH_analysis.py&quot;, line 15, in main
  
      df = df[sample_info.index]
  
    File &quot;/home/lu003/.local/lib/python3.8/site-packages/pandas/core/frame.py&quot;, line 3030, in __getitem__
      indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
  
    File &quot;/home/lu003/.local/lib/python3.8/site-packages/pandas/core/indexing.py&quot;, line 1266, in _get_listlike_indexer
  
      self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
  
    File &quot;/home/lu003/.local/lib/python3.8/site-packages/pandas/core/indexing.py&quot;, line 1308, in _validate_read_indexer
  
      raise KeyError(f&quot;None of [{key}] are in the [{axis_name}]&quot;)
  
  KeyError: 
  
  &quot;None of [Index(['oid sha256:8f40e082985198819ac5a55129272c64d4cf047cc688313b911ead6df82ebae4', 'size 6038'], dtype='object', name='version https://git-lfs.github.com/spec/v1')] are in the [columns]&quot;
  </code></pre>
  <p>My inputs:
  I ran their shell script rerun_all.sh and that runs all the analysis py files.
  In spatial_SeqFISH_analysis.py df and sample_info is used like so:</p>
  <pre><code>#pd is pandas
  
  df = pd.read_csv('exp_mat_43.csv', index_col=0) 
  df.columns = df.columns.map(int)
  
  # Get coordinates for each sample
  sample_info = pd.read_csv('sample_info_43.csv', index_col=0)
  
  df = df[sample_info.index]
  
  X = sample_info[['x', 'y']]
  </code></pre>
  <p>The csv files holds pointers I think to Git LFS. Example this is sample_info.csv:</p>
  <pre><code>version git-lfs.github.com/spec/v1 
  oid sha256:a6229820d917eab59582652a5f8ffcf8fa5ed124477ae2dd1046834f6bb5062d 
  size 164964
  </code></pre>
  <p>If anybody could be of help that would be great!</p>
  <p>The article link: <a href="https://www.nature.com/articles/nmeth.4636" rel="nofollow noreferrer">https://www.nature.com/articles/nmeth.4636</a>
  Github source code: <a href="https://github.com/Teichlab/SpatialDE" rel="nofollow noreferrer">https://github.com/Teichlab/SpatialDE</a></p>