title: Keras flow_from_dataframe
body: <p>I am trying to use keras flow_from_dataframe in order to augment the input images to my network (I am using the latest keras_preprocessing version). The network has an input image and an image as a label. I have a csv file in the following format that specifies the input-output:</p>
  
  <pre><code>Input,Output
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\1.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\2.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\3.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\4.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\5.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\6.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\1\7.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\1.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\104\1.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\104.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\104\10.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\104.JPG
  E:\LTM\SCIE_DB\Dataset_Part1\Dataset\104\11.JPG,E:\LTM\SCIE_DB\Dataset_Part1\Label\104.JPG
  </code></pre>
  
  <p>I am trying to load the csv to a dataframe  by the following code:</p>
  
  <pre><code>df=pd.read_csv(r"E:\LTM\SCIE_DB\dataset.csv",names=("Input","Output"),dtype={"Input":"str","Output":"str"})
  df = df.astype(str)
  print(df.dtypes)
  
  datagen=image.ImageDataGenerator(rescale=1./255)
  train_generator=datagen.flow_from_dataframe(dataframe=df, directory=None, x_col="Input", y_col="Output", class_mode="other", target_size=(32,32), batch_size=32,has_ext = True)
  </code></pre>
  
  <p>However, I keep getting the following error :</p>
  
  <pre><code>TypeError: y_col column/s must be numeric datatypes.
  </code></pre>
  
  <p>No matter what I am doing, I am unable to set the y_col as a str and it is always an object type. Any ideas?</p>