title: Changing string into integer in a column using lambda function doesn't work
body: <p>In my dataset there is a column that contains yes-no values, so I want to change them into 1-yes and 0-no using lambda function.</p>
  <p>Code:</p>
  <pre><code>df['columnname'] = df['columnname'].apply(lambda a:1 if a == 'Yes' else 0)
  </code></pre>
  <p>The problem is all of data in my dataset turns into 0. Where is the error?</p>