title: instead of encoding, i am trying that strings convert to integer but where is the problem?
body: <pre><code>data[&quot;column&quot;] = [2 if x==&quot;xxx&quot;, 1 if x==&quot;yyy&quot; else 0 for x in data[&quot;column&quot;]]
  
  --&gt; data[&quot;drive&quot;] = [2 if x==&quot;fwd&quot;, 1 if x==&quot;4wd&quot; else 0 for x in data[&quot;drive&quot;]]
                                    ^ SyntaxError: invalid syntax
  </code></pre>