title: How to create a tensorflow dataset from a DataFrame with vector columns?
body: <p>So I have some train data in a csv file <code>train.csv</code> with the following format:</p>
  
  <pre><code>x;y;type
  [1,2,3];[2,3,4];A
  [2,7,9];[0,1,2];B
  </code></pre>
  
  <p>This file is parsed as a <code>pd.DataFrame</code> with the following:
  </p>
  
  <pre><code>CSV_COLUMN_NAMES = ['x', 'y', 'type']
  train = pd.read_csv("train.csv", names=CSV_COLUMN_NAMES, header=0, delimiter=";")
  train['x'] = train['x'].apply(literal_eval)
  train['y'] = train['y'].apply(literal_eval)
  </code></pre>
  
  <p>So far so good. The <code>literal_eval</code> function is applied so <code>x</code> and <code>y</code> are treated as array. The next step is to create a <code>DataSet</code> with the following:</p>
  
  <pre><code>features, labels = train, train.pop('type')
  dataset = tf.data.Dataset.from_tensor_slices((dict(features), labels))
  </code></pre>
  
  <p>And here is where it breaks :( It spills the following errors:
  </p>
  
  <pre><code>TypeError: Expected binary or unicode string, got [1, 2, 3]
  </code></pre>
  
  <p>Why is binary or unicode string expected? Are vector feature columns not allowed? Or am I doing something wrong? Please shed me some light</p>