title: Receive "InvalidIndexError: Reindexing only valid with uniquely valued Index objects" when attempting to fill NaN with values from other rows
body: <p>I am working with one data frame in pandas only.  This error does not occur when I perform the following on a subset of this data frame (6 rows with NaN in some).  And it does exactly what I needed done.  In this case all the NaN in the 'Season' column got filled out properly.</p>
  <p>Before:
  <a href="https://i.stack.imgur.com/oKC3S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oKC3S.png" alt="subset data frame before" /></a></p>
  <p>Code:</p>
  <pre><code>s = df.set_index('Description')['Season'].dropna()
  </code></pre>
  <pre><code>df['Season'] = df['Season'].fillna(df['Description'].map(s))
  </code></pre>
  <p>After:
  <a href="https://i.stack.imgur.com/kcKkM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kcKkM.png" alt="Afterwards:" /></a></p>
  <p>Great!  This is what I want to happen, one column at time.  I worry about the other columns later.</p>
  <p>But then I try the same code above on the entire data frame which is over 5000 rows long, then I get the error stated above in the title, and I am unable to pin point it to a specific row(s).</p>
  <p>What did I try:
  I removed all non-ascii characters, and these special characters: ', &quot;, and # from the strings in the 'Description' column which sometimes has 50 characters including non-ascii and the three specific characters that I removed.</p>
  <pre><code>df['Description'] = df['Description'].str.encode('ascii', 'ignore').str.decode('ascii')
  
  df['Description'] = df['Description'].str.replace('&quot;', '')
  
  df['Description'] = df['Description'].str.replace(&quot;'&quot;, &quot;&quot;)
  
  df['Description'] = df['Description'].str.replace('#', '')
  </code></pre>
  <p>But the above did not help, and I still get the error. Does anyone have additional troubleshooting tips, or know what I am failing to look for?  Or ideally a solution.</p>
  <p>The code with subset DataFrame and main DataFrame are isolated.  So I am not mixing and using the 'df' and 's' interchangeably.  I wish that was the problem.</p>
  <p>Recall the subset data frame above where the code worked perfectly.  Through process of elimination I discovered that when the subset data frame has one extra row - total of 8 rows, the code still works as expected.  But once the 9th row is entered, the I get the error.  I can't figure out why.</p>
  <p><a href="https://i.stack.imgur.com/V4D3Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/V4D3Y.png" alt="DF with 8 rows Before the code" /></a></p>
  <p>Then the code:
  <code>s = df.set_index('Description')['Season'].dropna()</code>
  <code>df['Season'] = df['Season'].fillna(df['Description'].map(s))</code></p>
  <p>And the data frame is updated as expected:</p>
  <p><a href="https://i.stack.imgur.com/JeN4R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JeN4R.png" alt="DF with 8 rows after the above code is ran" /></a></p>
  <p>But when the 9th row added then the code above does not work:</p>
  <p><a href="https://i.stack.imgur.com/VyfpH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VyfpH.png" alt="DF with 9 rows - Before the code" /></a></p>
  <p><a href="https://i.stack.imgur.com/zd9OY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zd9OY.png" alt="DF with 9 rows - After the code is ran" /></a></p>