title: Assign conditional values to columns in Dask
body: <p>I am trying to do a conditional assignation to the rows of a specific column: <code>target</code>. I have done some research, and it seemed that the answer was given here: <a href="https://stackoverflow.com/questions/49639579/how-to-do-row-processing-and-item-assignment-in-dask">"How to do row processing and item assignment in dask"</a>. </p>
  
  <p>I will reproduce my necessity. Mock data set:</p>
  
  <pre><code>x = [3, 0, 3, 4, 0, 0, 0, 2, 0, 0, 0, 6, 9]
  y = [200, 300, 400, 215, 219, 360, 280, 396, 145, 276, 190, 554, 355]
  mock = pd.DataFrame(dict(target = x, speed = y))
  </code></pre>
  
  <p>The look of <code>mock</code> is:</p>
  
  <pre><code>In [4]: mock.head(7)
  Out [4]:
        speed target
      0   200 3
      1   300 0
      2   400 3
      3   215 4
      4   219 0
      5   360 0
      6   280 0
  </code></pre>
  
  <p>Having this <code>Pandas DataFrame</code>, I convert it into a <code>Dask DataFrame</code>:</p>
  
  <pre><code>mock_dask = dd.from_pandas(mock, npartitions = 2)
  </code></pre>
  
  <p>I apply my conditional rule: all values in <code>target</code> above 0, must be 1, all others 0 (binaryze <code>target</code>). Following the mentioned thread above, it should be:</p>
  
  <pre><code>result = mock_dask.target.where(mock_dask.target &gt; 0, 1)
  </code></pre>
  
  <p>I have a look at the result dataset and it is not working as expected:</p>
  
  <pre><code>In [7]: result.head(7)
  Out [7]:
  0    3
  1    1
  2    3
  3    4
  4    1
  5    1
  6    1
  Name: target, dtype: object 
  </code></pre>
  
  <p>As we can see, the column <code>target</code> in <code>mock</code> and <code>result</code> are not the expected results. It seems that my code is converting all 0 original values to 1, instead of the values that are greater than 0 into 1 (the conditional rule).</p>
  
  <p>Dask newbie here, Thanks in advance for your help. </p>