title: Parsing CSV into Pytorch tensors
body: <p>I have a CSV files with all numeric values except the header row. When trying to build tensors, I get the following exception:</p>
  
  <pre><code>Traceback (most recent call last):
    File "pytorch.py", line 14, in &lt;module&gt;
      test_tensor = torch.tensor(test)
  ValueError: could not determine the shape of object type 'DataFrame'
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>import torch
  import dask.dataframe as dd
  
  device = torch.device("cuda:0")
  
  print("Loading CSV...")
  test = dd.read_csv("test.csv", encoding = "UTF-8")
  train = dd.read_csv("train.csv", encoding = "UTF-8")
  
  print("Converting to Tensor...")
  test_tensor = torch.tensor(test)
  train_tensor = torch.tensor(train)
  </code></pre>
  
  <p>Using <code>pandas</code> instead of <code>Dask</code> for CSV parsing produced the same error. I also tried to specify <code>dtype=torch.float64</code> inside the call to <code>torch.tensor(data)</code>, but got the same error again.</p>