docstr: TSDataset is an abstract of time series dataset.
  Cascade call is supported for most of the transform methods.
docstr_tok: ["TSDataset","is","an","abstract","of","time","series","dataset",".","Cascade","call","is","supported","for","most","of","the","transform","methods","."]
code: def __init__(self, data, **schema):
      """
      TSDataset is an abstract of time series dataset.
      Cascade call is supported for most of the transform methods.
      """
      self.df = data
      self.id_col = schema["id_col"]
      self.dt_col = schema["dt_col"]
      self.feature_col = schema["feature_col"].copy()
      self.target_col = schema["target_col"].copy()
  
      self.numpy_x = None
      self.numpy_y = None
      self.roll_feature = None
      self.roll_target = None
      self.roll_feature_df = None
      self.roll_additional_feature = None
      self.scaler = None
      self.scaler_index = [i for i in range(len(self.target_col))]
      self.id_sensitive = None
      self._has_generate_agg_feature = False
      self._check_basic_invariants()
  
      self._id_list = list(np.unique(self.df[self.id_col]))
      self._freq_certainty = False
      self._freq = None
      self._is_pd_datetime = pd.api.types.is_datetime64_any_dtype(
          self.df[self.dt_col].dtypes
      )
      if self._is_pd_datetime:
          if len(self.df[self.dt_col]) < 2:
              self._freq = None
          else:
              self._freq = (
                  self.df[self.dt_col].iloc[1]
                  - self.df[self.dt_col].iloc[0]
              )
  
imports: import pandas
  import numpy
  import functools
  from zoo.chronos.data.utils.feature import generate_dt_features, generate_global_features
  from zoo.chronos.data.utils.impute import impute_timeseries_dataframe
  from zoo.chronos.data.utils.deduplicate import deduplicate_timeseries_dataframe
  from zoo.chronos.data.utils.roll import roll_timeseries_dataframe
  from zoo.chronos.data.utils.scale import unscale_timeseries_numpy
  from zoo.chronos.data.utils.resample import resample_timeseries_dataframe
  from zoo.chronos.data.utils.split import split_timeseries_dataframe
  from zoo.chronos.data.utils.utils import _to_list, _check_type, _check_col_within, _check_col_no_na, _check_is_aligned, _check_dt_is_sorted
  from tsfresh.utilities.dataframe_functions import roll_time_series
  from tsfresh.utilities.dataframe_functions import impute
  from tsfresh import extract_features
  from tsfresh.feature_extraction import ComprehensiveFCParameters, MinimalFCParameters, EfficientFCParameters
label_desc: Use image node_id 1 to create a new TSDataset object  with example: obj = TSDataset(data)