title: How to check the value is postive or negative and insert a new value in a column of a data frame
body: <p>I am working with pandas and python and I have a task where, I need to check</p>
  
  <pre><code>        GDP         diff    sign
  Quarter             
  1999q4  12323.3     NaN     None
  2000q1  12359.1     35.8    None
  2000q2  12592.5     233.4   None
  2000q3  12607.7     15.2    None
  2000q4  12679.3     71.6    None
  </code></pre>
  
  <p>Let the above dataframe be df and when I do </p>
  
  <pre><code>if df.iloc[2]['diff'] &gt; 0:
      df.iloc[2]['sign'] = "Positive"
  </code></pre>
  
  <p>The value is not getting updated on the dataframe. Is there something where I'm doing wrong. Its a direct assignment like how we do df['something'] = 'some value' and by doing this it will insert than value into df under that column. But when i do the above where i need to determine positive or negative, it is still showing as None when I do</p>
  
  <pre><code>df.iloc[2]['sign']
  </code></pre>
  
  <p>I tried using apply with lambdas, but couldn't get what I wanted.</p>
  
  <p>Some help would be appreciated
  Thank you. </p>