code: def parse_csv_labels(fn, skip_header=True, cat_separator = ' '):
      
      df = pd.read_csv(fn, index_col=0, header=0 if skip_header else None, dtype=str)
      fnames = df.index.values
      df.iloc[:,0] = df.iloc[:,0].str.split(cat_separator)
      return fnames, list(df.to_dict().values())[0]
docs: Parse filenames and label sets from a CSV file.
  
      This method expects that the csv file at path :fn: has two columns. If it
      has a header, :skip_header: should be set to True. The labels in the
      label set are expected to be space separated.
  
      Arguments:
          fn: Path to a CSV file.
          skip_header: A boolean flag indicating whether to skip the header.
  
      Returns:
          a two-tuple of (
              image filenames,
              a dictionary of filenames and corresponding labels
          )
      .
      :param cat_separator: the separator for the categories column