code: def _roll_timeseries_dataframe_train(
      df, roll_feature_df, lookback, horizon, feature_col, target_col
  ):
      max_horizon = (
          horizon if isinstance(horizon, int) else max(horizon)
      )
      x = (
          df[:-max_horizon]
          .loc[:, target_col + feature_col]
          .values.astype(np.float32)
      )
      y = (
          df.iloc[lookback:]
          .loc[:, target_col]
          .values.astype(np.float32)
      )
  
      output_x, mask_x = _roll_timeseries_ndarray(x, lookback)
      output_y, mask_y = _roll_timeseries_ndarray(y, horizon)
      mask = (mask_x == 1) & (mask_y == 1)
  
      x = _append_rolling_feature_df(output_x[mask], roll_feature_df)
  
      return x, output_y[mask]
  
file_path: analytics-zoo/pyzoo/zoo/chronos/data/utils/roll.py
imports: import numpy
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: _roll_timeseries_dataframe_train(df, roll_feature_df, lookback, horizon, feature_col, target_col) and returns: x,  output_y