title: single pass data transformation using dask to do same as basic pandas example
body: <p>Im trying to understand how <a href="http://dask.pydata.org/en/latest/dataframe-api.html#dataframe-methods" rel="nofollow">dask</a> can help me do data transformation on a huge dataset. The task I need to perform is as the example below in pandas.</p>
  
  <pre><code>import pandas as pd
  pdf = pd.DataFrame({'ID': ['A', 'B', 'C', 'D', 'A', 'B', 'B', 'B', 'C'],
                      'VAL1': [0,1,4,1,4,1,1,1,4],
                      'VAL2': [0,3,4,3,4,3,3,3,4],
                      'VAL3': [4,3,4,3,4,3,3,3,4],
                      'VAL4': [4,3,4,3,4,3,3,3,4]})
  vals1 = ['VAL1', 'VAL2']
  vals2 = ['VAL3', 'VAL4']
  pdf[vals1] = pdf[vals1].applymap(lambda x: 1 if x &gt; 1 else 0)
  pdf[vals2] = pdf[vals2].applymap(lambda x: 1 if x &lt; 4 else 0)
  pdf['ANY1'] = pdf[vals1+vals2].apply(lambda row: 1 if sum(row) &gt; 0 else 0,axis=1)
  pdf['ONES'] = 1
  pdf.groupby(['ID']).sum()
  </code></pre>
  
  <p>When I start out using:</p>
  
  <pre><code>import dask.dataframe as dd
  df = dd.from_pandas(pdf, chunksize=9)
  df...
  </code></pre>
  
  <p>I get stuck right away when trying to transform the data im multiple columns and adding more columns all in  a single pass.</p>
  
  <p>So my question is how can I recreate the example from pandas dask and a single pass over the data?</p>