title: Pyspark Implementation of Oracel Decode
body: <p>The following oracle SQL command is a one line short command to convert integer to string representation of the value.
  <br>
  <br>
  <code> Select DECODE(employee.active, 1, 'YES', 'NO') from employee</code></p>
  <p>The same can be achieved in Pyspark using <br> <br>
  <code>employee = employee.withColumn('active', f.when(employee.active == 1, f.lit('YES')).otherwise('NO'))</code></p>
  <p>is there a pythonic way or Pyspark one-liner that does this ?</p>