class_docstr: A class to interact with Vertex AI
docstr: Make a prediction from a Pandas dataframe
docstr_tok: ["Make","a","prediction","from","a","Pandas","dataframe"]
code: def predict_from_df(
      self, endpoint_display_name, df, custom_model=False
  ):
      """Make a prediction from a Pandas dataframe"""
      endpoint = self.get_endpoint_by_display_name(
          endpoint_display_name
      )
      if custom_model:
          records = df.values.tolist()
      else:
          records = df.astype(str).to_dict(
              orient="records"
          )  # list of dictionaries
      prediction = endpoint.predict(instances=records)
      return prediction
  
file_path: mindsdb/mindsdb/integrations/handlers/vertex_handler/vertex_client.py
imports: from mindsdb.utilities import log
  from google.cloud import aiplatform
  from google.oauth2 import service_account
  import pandas
label_desc: Use image node_id 9 for calling the VertexClient obj's underlying member method code with example usage: obj.predict_from_df(endpoint_display_name, df, custom_model) and returns: prediction