docstr: Create and train model on given data
docstr_tok: ["Create","and","train","model","on","given","data"]
code: def create(
      self,
      target: str,
      df: Optional[pd.DataFrame] = None,
      args: Optional[Dict] = None,
  ) -> None:
      """Create and train model on given data"""
      # parse args
      if "using" not in args:
          raise Exception(
              "PyCaret engine requires a USING clause! Refer to its documentation for more details."
          )
      using = args["using"]
      if df is None:
          raise Exception(
              "PyCaret engine requires a some data to initialize!"
          )
      # create experiment
      s = self._get_experiment(using["model_type"])
      s.setup(
          df, **self._get_experiment_setup_kwargs(using, args["target"])
      )
      # train model
      model = self._train_model(s, using)
      # save model and args
      model_file_path = os.path.join(
          self.model_storage.fileStorage.folder_path, "model"
      )
      s.save_model(model, model_file_path)
      self.model_storage.json_set(
          "saved_args", {**args["using"], "model_path": model_file_path}
      )
  
file_path: mindsdb/mindsdb/integrations/handlers/pycaret_handler/pycaret_handler.py
imports: from typing import Optional, Dict
  import os
  import pandas
  from mindsdb.integrations.libs.base import BaseMLEngine
  from pycaret.classification import ClassificationExperiment
  from pycaret.regression import RegressionExperiment
  from pycaret.time_series import TSForecastingExperiment
  from pycaret.clustering import ClusteringExperiment
  from pycaret.anomaly import AnomalyExperiment
label_desc: Use image node_id 2 for calling the PyCaretHandler obj's underlying member method code with example usage: obj.create(target, df, args) without return types