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)
code: def __init__(
      self,
      csv,
      input_cols=None,
      target_cols=None,
      input_transform=None,
      target_transform=None,
      co_transform=None,
      apply_transforms_individually=False,
  ):
      if input_cols is None:
          raise AssertionError
  
      self.input_cols = _process_cols_argument(input_cols)
      self.target_cols = _process_cols_argument(target_cols)
  
      self.do_individual_transforms = apply_transforms_individually
  
      self.df = _process_csv_argument(csv)
  
      self.inputs = _select_dataframe_columns(self.df, self.input_cols)
      self.num_inputs = self.inputs.shape[1]
      self.input_return_processor = (
          _return_first_element_of_list
          if self.num_inputs == 1
          else _pass_through
      )
  
      if self.target_cols is None:
          self.num_targets = 0
          self.has_target = False
      else:
          self.targets = _select_dataframe_columns(
              self.df, self.target_cols
          )
          self.num_targets = self.targets.shape[1]
          self.target_return_processor = (
              _return_first_element_of_list
              if self.num_targets == 1
              else _pass_through
          )
          self.has_target = True
          self.min_inputs_or_targets = min(
              self.num_inputs, self.num_targets
          )
  
      self.input_loader = default_file_reader
      self.target_loader = default_file_reader
  
      # The more common use-case would be to apply the transform to the row as a whole, but we support
      # applying transform to individual elements as well (with a flag)
      if self.do_individual_transforms:
          self.input_transform = _process_transform_argument(
              input_transform, self.num_inputs
          )
      else:
          self.input_transform = _process_transform_argument(
              input_transform, 1
          )
  
      if self.has_target:
          if self.do_individual_transforms:
              self.target_transform = _process_transform_argument(
                  target_transform, self.num_targets
              )
              self.co_transform = _process_co_transform_argument(
                  co_transform, self.num_inputs, self.num_targets
              )
          else:
              self.target_transform = _process_transform_argument(
                  target_transform, 1
              )
              self.co_transform = _process_co_transform_argument(
                  co_transform, 1, 1
              )
  
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 1 to create a new CSVDataset object from inherited base classes: BaseDataset with example: obj = CSVDataset(csv, input_cols, target_cols, input_transform, target_transform, co_transform, apply_transforms_individually)