class_docstr: Interact with Weaviate database to store vectors. This hook uses the 'conn_id'.
  
  :param conn_id: The connection id to use when connecting to Weaviate. <howto/connection:weaviate>
class_docstr_tok: ["Interact","with","Weaviate","database","to","store","vectors",".","This","hook","uses","the","'conn_id","'",".",":","param","conn_id",":","The","connection","id","to","use","when","connecting","to","Weaviate",".","<","howto\/connection",":","weaviate",">"]
docstr: Helper function to convert dataframe to list of dicts.
  
  In scenario where Pandas isn't installed and we pass data as a list of dictionaries, importing
  Pandas will fail, which is invalid. This function handles this scenario.
code: def _convert_dataframe_to_list(
      data: list[dict[str, Any]] | pd.DataFrame
  ) -> list[dict[str, Any]]:
      """Helper function to convert dataframe to list of dicts.
  
      In scenario where Pandas isn't installed and we pass data as a list of dictionaries, importing
      Pandas will fail, which is invalid. This function handles this scenario.
      """
      with contextlib.suppress(ImportError):
          import pandas
  
          if isinstance(data, pandas.DataFrame):
              data = json.loads(data.to_json(orient="records"))
      return cast(List[Dict[str, Any]], data)
  
imports: from __future__ import annotations
  import contextlib
  import json
  import warnings
  from functools import cached_property
  from typing import TYPE_CHECKING, Any, Dict, List, Sequence, cast
  import requests
  import weaviate.exceptions
  from tenacity import Retrying, retry, retry_if_exception, retry_if_exception_type, stop_after_attempt
  from weaviate import Client
  from weaviate.auth import AuthApiKey, AuthBearerToken, AuthClientCredentials, AuthClientPassword
  from weaviate.data.replication import ConsistencyLevel
  from weaviate.exceptions import ObjectAlreadyExistsException
  from weaviate.util import generate_uuid5
  from airflow.exceptions import AirflowProviderDeprecationWarning
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 10 for calling the WeaviateHook obj's underlying member method code with example usage: obj._convert_dataframe_to_list(data) and returns: cast