title: Overwriting Nan values with .loc in Pandas
body: <p>I tried to solve the required task with the following code line:</p>
  
  <p><code>df['Age'][np.isnan(df["Age"])] = rand1</code></p>
  
  <p><a href="https://i.stack.imgur.com/Scz9L.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Scz9L.jpg" alt="enter image description here"></a></p>
  
  <p>But this raises a "SettingWithCopyWarning" and I think locating the Nan values in the dataframe (Column 'Age') by using the <code>.loc</code> feature might be a better way of doing this. </p>
  
  <p>I already took a look at the <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy" rel="noreferrer">documentation</a>, but still don't know how I can fix this problem. Couldn't find any solutions on here with <code>.loc</code> either.</p>
  
  <p>I would appreciate any hints and advice.</p>