class_docstr: Integration with the Nixtla TimeGPT models for
  zero-shot time series forecasting.
class_docstr_tok: ["Integration","with","the","Nixtla","TimeGPT","models","for","zero-shot","time","series","forecasting","."]
code: def _transform_to_nixtla_df(self, df, settings_dict, exog_vars=[]):
      nixtla_df = df.copy()
      # Transform group columns into single unique_id column
      gby = settings_dict["group_by"]
      if len(gby) > 1:
          for col in gby:
              nixtla_df[col] = nixtla_df[col].astype(str)
          nixtla_df["unique_id"] = nixtla_df[gby].agg("/".join, axis=1)
          group_col = "ignore this"
      elif len(gby) == 1 and gby[0] is not None:
          group_col = settings_dict["group_by"][0]
      else:
          group_col = "__unique_id"
          nixtla_df[group_col] = "1"
  
      # Rename columns to statsforecast names
      nixtla_df = nixtla_df.rename(
          {
              settings_dict["target"]: "y",
              settings_dict["order_by"]: "ds",
              group_col: "unique_id",
          },
          axis=1,
      )
  
      columns_to_keep = ["unique_id", "ds", "y"] + exog_vars
      nixtla_df = self._convert_to_iso(nixtla_df, "ds")
      nixtla_df = nixtla_df[columns_to_keep].sort_values(
          by=["unique_id", "ds"], ascending=True
      )  # expects ascending
      nixtla_df["y"] = nixtla_df["y"].astype(float)
      return nixtla_df.reset_index(drop=True)
  
file_path: mindsdb/mindsdb/integrations/handlers/timegpt_handler/timegpt_handler.py
imports: from typing import Optional, Dict
  import pandas
  from nixtlats import TimeGPT
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.integrations.utilities.handler_utils import get_api_key
  from mindsdb.integrations.utilities.time_series_utils import get_results_from_nixtla_df
label_desc: Use image node_id 5 for calling the TimeGPTHandler obj's underlying member method code with example usage: obj._transform_to_nixtla_df(df, settings_dict, exog_vars) and returns: nixtla_df