title: Pandas Dataframe - replace NaN with 0 if column value condition
body: <p>I have searched all around the internet and tried many methods before making this post, I have a dataframe where I want to:</p>
  <ul>
  <li>Replace NaN value of <strong>TGT_COLUMN_SCALE</strong> to 0 If <strong>TGT_COLUMN_DATA_TYPE</strong> is equals to NUMERIC.</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/68r4U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/68r4U.png" alt="my dataframe" /></a></p>
  <p>Kindly help me out with this issue.</p>
  <p>I tried this code but it's not working:</p>
  <pre><code>df[&quot;TGT_COLUMN_SCALE&quot;] = np.where(df[&quot;TGT_COLUMN_DATA_TYPE&quot;] == &quot;NUMERIC&quot;, 'NaN', 0)
  </code></pre>