title: How to swap column values on conditions in python polars?
body: <p>I have a data frame as below:</p>
  <pre><code>df_n = pl.from_pandas(pd.DataFrame({'last_name':[np.nan,'mallesh','bhavik'],
                                      'first_name':['a','b','c'],
                                      'middle_name_or_initial':['aa','bb','cc']}))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Bu9K2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bu9K2.png" alt="enter image description here" /></a></p>
  <p>Here I would like to find an observation which has First and Middle Name not NULL and Last Name is Null, in this case first_name should be swapped to last_name and middle_name should be swapped to first_name, and middle_name to be EMPTY.</p>
  <p>expected output will be:</p>
  <p><a href="https://i.stack.imgur.com/TTJ8d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TTJ8d.png" alt="enter image description here" /></a></p>
  <p>I'm trying with this command:</p>
  <pre><code>df_n.with_columns([
      pl.when((pl.col('first_name').is_not_null()) &amp; (pl.col('middle_name_or_initial').is_not_null()) &amp; (pl.col('last_name').is_null())
             ).then(pl.col('first_name').alias('last_name')).otherwise(pl.col('last_name').alias('first_name')),
      pl.when((pl.col('first_name').is_not_null()) &amp; (pl.col('middle_name_or_initial').is_not_null()) &amp; (pl.col('last_name').is_null())
             ).then(pl.col('middle_name_or_initial').alias('first_name')).otherwise('').alias('middle_name_or_initial')
  ]
  )
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ozO8N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ozO8N.png" alt="enter image description here" /></a></p>
  <p>Here it is throwing a wrong output and any help ?</p>