title: Key error when performing pd.merge on string columns
body: <p>I'm having trouble performing a merge on two dataframes.</p>
  
  <p>My data is as follows, one comprises a dataset of 140,000 occurrence records of 121 different indicator species, eg:</p>
  
  <pre><code>taxon
  spp1
  spp1
  spp118
  spp98
  spp64
  spp119
  </code></pre>
  
  <p>The other comprises a list of the 121 species with a numeric score, eg:</p>
  
  <pre><code>taxon  score
  spp1   8
  spp2   4
  spp3   2
  spp4   7
  ...
  spp118 4
  spp119 2
  spp120 1
  spp121 8
  </code></pre>
  
  <p>I wish to join the score column to the dataset using the taxon column as the join field for subsequent analysis, I envisage an output like so:</p>
  
  <pre><code>taxon  score
  spp1   8
  spp1   8
  spp118 4
  spp98  6
  spp64  2
  spp119 2
  </code></pre>
  
  <p>So far I have tried the following:</p>
  
  <pre><code>data_in1 = pd.read_csv(r'occourence_list.csv', encoding='utf-8')
  df1 = pd.DataFrame(data_in1)
  df1['taxon'] = df1['taxon'].astype(str)
  print(df1.head())
  print(df1.dtypes)
  
  data_in2 = pd.read_csv(r'score_list.csv', encoding='utf-8')
  df2 = pd.DataFrame(data_in2)
  df2['taxon'] = df2['taxon'].astype(str)
  print(df2.head())
  print(df2.dtypes)
  
  result = pd.merge(df1,
                    df2[['iapa_score']],
                    left_on=['taxon'],
                    right_on=['taxon'],
                    how='outer')
  
  print(result.head())
  </code></pre>
  
  <p>However, this returns the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/", line 19, in &lt;module&gt;
      how='outer')
    File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pandas\core\reshape\merge.py", line 47, in merge
      validate=validate)
    File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pandas\core\reshape\merge.py", line 529, in __init__
      self.join_names) = self._get_merge_keys()
    File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pandas\core\reshape\merge.py", line 833, in _get_merge_keys
      right._get_label_or_level_values(rk))
    File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\pandas\core\generic.py", line 1706, in _get_label_or_level_values
      raise KeyError(key)
  KeyError: 'taxon'
  </code></pre>