title: Trying to read csv dataset into tensorflow
body: <p>I have csv files(train and test) that contains data in the following format</p>
  
  <p><a href="https://i.stack.imgur.com/q26wq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q26wq.png" alt="enter image description here"></a></p>
  
  <p>I am trying to load my data (100MB) into tensorflow input pipeline (not sure if this is the right way to do it). </p>
  
  <pre><code>  x, y = tf.placeholder(tf.float32, shape=[None,2]), tf.placeholder(tf.float32, shape=[None,1])
   dataset = tf.data.Dataset.from_tensor_slices((x, y))
  
  train_dataset = tf.contrib.data.make_csv_dataset(csv_path+'\csvdatatrain.csv', batch_size=32)
  test_dataset = tf.contrib.data.make_csv_dataset(csv_path+'\csvdatatest.csv', batch_size=32)
  
  
  iter = dataset.make_initializable_iterator()
  features, labels = iter.get_next()
  with tf.Session() as sess:
      #initialise iterator with train data
      sess.run(iter.initializer, feed_dict={x: train_dataset[0], y: train_dataset[1]})
  
      for _ in range(EPOCHS):
          #### Training
          print('This is training')
  
          #### Testing
          sess.run(iter.initializer, feed_dict={ x: test_dataset[0], y: test_dataset[1]})
          print('This is testing')
  </code></pre>
  
  <p>I am getting an error while initializing iterator with train data</p>
  
  <blockquote>
    <p>sess.run(iter.initializer, feed_dict={ x: train_dataset<a href="https://i.stack.imgur.com/q26wq.png" rel="nofollow noreferrer">1</a>, y: train_dataset [0]}) 
    TypeError: 'PrefetchDataset' object does not support indexing</p>
  </blockquote>