title: Assign (add) a new column to a dask dataframe based on values of 2 existing columns - involves a conditional statement
body: <p>I would like to add a new column to an existing dask dataframe based on the values of the 2 existing columns and involves a conditional statement for checking nulls:</p>
  
  <p><strong>DataFrame definition</strong></p>
  
  <pre><code>import pandas as pd
  import dask.dataframe as dd
  
  df = pd.DataFrame({'x': [1, 2, 3, 4, 5], 'y': [0.2, "", 0.345, 0.40, 0.15]})
  ddf = dd.from_pandas(df1, npartitions=2)
  </code></pre>
  
  <p><strong>Method-1 tried</strong></p>
  
  <pre><code>def funcUpdate(row):
      if row['y'].isnull():
          return row['y']
      else:
          return  round((1 + row['x'])/(1+ 1/row['y']),4)
  
  ddf = ddf.assign(z= ddf.apply(funcUpdate, axis=1 , meta = ddf))
  </code></pre>
  
  <p>It gives an error:</p>
  
  <pre><code>TypeError: Column assignment doesn't support type DataFrame
  </code></pre>
  
  <p><strong>Method-2</strong></p>
  
  <pre><code>ddf = ddf.assign(z = ddf.apply(lambda col: col.y if col.y.isnull() else  round((1 + col.x)/(1+ 1/col.y),4),axis = 1, meta = ddf))
  </code></pre>
  
  <p>Any idea how it should be done ? </p>