title: pandas replace null values for a subset of rows and columns
body: <p>In a pandas dataframe, I want to replace nan values by a zero if values in an other column are not nan.
  I tried to adapt the answer from this question: <a href="https://stackoverflow.com/questions/37191893/pandas-replace-null-values-for-a-subset-of-columns">pandas replace null values for a subset of columns</a> </p>
  
  <p>However, the nan values are not replaced (see code below). What did I do wrong? Thank you in advance.</p>
  
  <pre><code>df.loc[df['Litho'].notnull(),'Mu_alt'].fillna(0, inplace=True)
  df.loc[df['Litho'].notnull(),'Mu_alt']
  &gt;&gt;&gt;0      NaN
  &gt;&gt;&gt;1      NaN
  &gt;&gt;&gt;2      NaN
  &gt;&gt;&gt;3      NaN
  &gt;&gt;&gt;4      NaN
  &gt;&gt;&gt;5      NaN
  &gt;&gt;&gt;6      NaN
  &gt;&gt;&gt;7      NaN
  </code></pre>
  
  <p>If I replace <code>df['Litho'].notnull()</code> by <code>:</code> in the first line, the nan values are replaced by a 0.</p>