title: Input pipeline using TensorFlow Dataset API and Pandas?
body: <p>I am trying to create a TensorFlow Dataset that takes in a list of path names for CSV files and create batches of training data. First I create a parse function which uses Pandas to read the first n rows. I give this function as argument for the 'map' method in Dataset</p>
  
  <pre><code>def _get_data_for_dataset(file_name,rows=100):
    print(file_name.decode())
  
    df_input=pd.read_csv(os.path.join(folder_name, file_name.decode()),
                       usecols =['Wind_MWh','Actual_Load_MWh'],nrows = rows)
  
    X_data = df_input.as_matrix()
    X_data.astype('float32', copy=False)
  
    return X_data
  
   dataset = tf.data.Dataset.from_tensor_slices(file_names)
   dataset = dataset2.map(lambda file_name: tf.py_func(_get_data_for_dataset,[file_name,100], tf.float64))
   dataset= dataset.batch(2) #Create batches
   iter = dataset.make_one_shot_iterator()
   get_batch = iter.get_next()
  
  with tf.Session() as sess:
    print(sess.run(get_batch).shape)
  </code></pre>
  
  <p>The above code works but instead of producing a dataset with shape (200,2) it produces a dataset with shape (2, 100, 2). Please help.</p>