class_docstr: Initialize a Dataset from a CSV file/dataframe. This does NOT
  actually load the data into memory if the ``csv`` parameter contains filepaths.
  
  :param csv: (string or pandas.DataFrame):
      if string, should be a path to a .csv file which
      can be loaded as a pandas dataframe
  
  :param input_cols: (list of ints, or list of strings):
      which column(s) to use as input arrays.
      If int(s), should be column indicies.
      If str(s), should be column names
  
  :param target_cols: (list of ints, or list of strings):
      which column(s) to use as input arrays.
      If int(s), should be column indicies.
      If str(s), should be column names
  
  :param input_transform: (transform):
      tranform to apply to inputs during runtime loading
  
  :param target_tranform: (transform):
      transform to apply to targets during runtime loading
  
  :param co_transform: (transform):
      transform to apply to both inputs and targets simultaneously
      during runtime loading
  
  :param apply_transforms_individually: (bool):
      Whether to apply transforms to individual inputs or to an input row as a whole (default: False)
docstr: Split this dataset object into multiple dataset objects based on
  the unique factors of the given column. The number of returned
  datasets will be equal to the number of unique values in the given
  column. The transforms and original dataframe will all be transferred
  to the new datasets
  
  Useful for splitting a dataset into train/val/test datasets.
  
  :param col: (integer or string)
      which column to split the data on.
      if int, should be column index.
      if str, should be column name
  
  :return: list of new datasets with transforms copied
docstr_tok: ["Split","this","dataset","object","into","multiple","dataset","objects","based","on","the","unique","factors","of","the","given","column",".","The","number","of","returned","datasets","will","be","equal","to","the","number","of","unique","values","in","the","given","column",".","The","transforms","and","original","dataframe","will","all","be","transferred","to","the","new","datasets","Useful","for","splitting","a","dataset","into","train\/val\/test","datasets",".",":","param","col",":","(","integer","or","string",")","which","column","to","split","the","data","on",".","if","int",",","should","be","column","index",".","if","str",",","should","be","column","name",":","return",":","list","of","new","datasets","with","transforms","copied"]
code: def split_by_column(self, col):
      """
      Split this dataset object into multiple dataset objects based on
      the unique factors of the given column. The number of returned
      datasets will be equal to the number of unique values in the given
      column. The transforms and original dataframe will all be transferred
      to the new datasets
  
      Useful for splitting a dataset into train/val/test datasets.
  
      :param col: (integer or string)
          which column to split the data on.
          if int, should be column index.
          if str, should be column name
  
      :return: list of new datasets with transforms copied
      """
      if isinstance(col, int):
          split_vals = self.df.iloc[:, col].values.flatten()
  
          new_df_list = []
          for unique_split_val in np.unique(split_vals):
              new_df = self.df[:][
                  self.df.iloc[:, col] == unique_split_val
              ]
              new_df_list.append(new_df)
      elif isinstance(col, str):
          split_vals = self.df.loc[:, col].values.flatten()
  
          new_df_list = []
          for unique_split_val in np.unique(split_vals):
              new_df = self.df[:][
                  self.df.loc[:, col] == unique_split_val
              ]
              new_df_list.append(new_df)
      else:
          raise ValueError(
              "col argument not valid - must be column name or index"
          )
  
      new_datasets = []
      for new_df in new_df_list:
          new_dataset = self.copy(new_df)
          new_datasets.append(new_dataset)
  
      return new_datasets
  
file_path: pywick/pywick/datasets/CSVDataset.py
imports: from .BaseDataset import BaseDataset
  import numpy
  import pandas
  from .data_utils import _return_first_element_of_list, default_file_reader, _pass_through, _process_transform_argument, _process_co_transform_argument
label_desc: Use image node_id 3 for calling the CSVDataset obj's underlying member method code with example usage: obj.split_by_column(col) and returns: new_datasets