title: Can't convert dataframe column data types
body: <p>After processing a big data set using Pandas/Dask, I saved the resulting data frame to a csv file.</p>
  
  <p>When I try to read the output CSV using Dask, the data types are all objects by default. Whenever I try to convert them using conventional methods (e.g. defining data types while reading or reassigning them after reading) I keep getting errors regarding the conversion as seen below:</p>
  
  <pre><code># ATTEMPT 1
  
  import dask.dataframe as dd
  header = ['colA', 'colB', ...]
  dtypes = {'colA' : 'float', ...}
  df = dd.read_csv('file.csv', names=header, dtype=types)
  
  &gt; TypeError: Cannot cast array from dtype('O') to dtype('float64') according to the rule 'safe'
  &gt; ...
  &gt; ValueError: could not convert string to float: 'colA'
  
  -----------------------------------------------------------------------------------
  
  # ATTEMPT 2
  
  import dask.dataframe as dd
  header = ['colA', 'colB', ...]
  df = dd.read_csv('file.csv', names=header)
  df['colA'] = df['colA'].astype(str).astype(float)
  
  &gt; ...
  &gt; File "/home/routar/anaconda3/lib/python3.6/site-packages/pandas/core/dtypes/cast.py", line 730, in astype_nansafe
  &gt; ValueError: could not convert string to float: 'colA'
  </code></pre>
  
  <p>All the attributes in the original data frame (before converting to CSV) are ints/floats so the conversion is 100% possible. I'm also sure the values are valid.</p>
  
  <p>I'm guessing this has something to do with Python's safe policy regarding data conversions.</p>
  
  <p>Is there a workaround for this or any way to force the conversion?</p>