title: python: if-else in value definition as argument
body: <p><strong>NOTE</strong>: it is NOT Symbol to Digit converter!!! i am using that structure as example only!!</p>
  <p>i have to use following structure to define new column in dataframe. Is there better and more accurate structure to archive the same result, something like &quot;case&quot;?</p>
  <pre><code>df['type']  = ['1' if x  == 'A' else 
                ('2' if x  == 'B' else 
                ('3' if x  == 'C' else 
                ('9' if x  == 'D' else 0))) for x in df['argument']]
  </code></pre>