code: def split_data(self):
          
  
          try:
              # Extract data ranging in time_period1
              time_period1 = (slice(self.baseline_period[0], self.baseline_period[1]))
              self.baseline_in = self.original_data.loc[time_period1, self.input_col]
              self.baseline_out = self.original_data.loc[time_period1, self.output_col]
  
              if self.exclude_time_period:
                  for i in range(0, len(self.exclude_time_period), 2):
                      # Drop data ranging in exclude_time_period1
                      exclude_time_period1 = (slice(self.exclude_time_period[i], self.exclude_time_period[i+1]))
                      self.baseline_in.drop(self.baseline_in.loc[exclude_time_period1].index, axis=0, inplace=True)
                      self.baseline_out.drop(self.baseline_out.loc[exclude_time_period1].index, axis=0, inplace=True)
          except Exception as e:
              raise e
  
          # CHECK: Can optimize this part
          # Error checking to ensure time_period values are valid
          if self.projection_period:
              for i in range(0, len(self.projection_period), 2):
                  period = (slice(self.projection_period[i], self.projection_period[i+1]))
                  try:
                      self.original_data.loc[period, self.input_col]
                      self.original_data.loc[period, self.output_col]
                  except Exception as e:
                      raise e
docs: Split data according to baseline and projection time period values.