class_docstr: This handler handles connection and execution of the ChromaDB statements.
class_docstr_tok: ["This","handler","handles","connection","and","execution","of","the","ChromaDB","statements","."]
code: def select(
      self,
      table_name: str,
      columns: List[str] = None,
      conditions: List[FilterCondition] = None,
      offset: int = None,
      limit: int = None,
  ) -> pd.DataFrame:
      collection = self._client.get_collection(table_name)
      filters = self._translate_metadata_condition(conditions)
  
      include = ["metadatas", "documents", "embeddings"]
  
      # check if embedding vector filter is present
      vector_filter = (
          []
          if conditions is None
          else [
              condition
              for condition in conditions
              if condition.column == TableField.EMBEDDINGS.value
          ]
      )
  
      if len(vector_filter) > 0:
          vector_filter = vector_filter[0]
      else:
          vector_filter = None
      id_filters = []
      if conditions is not None:
          for condition in conditions:
              if condition.column != TableField.ID.value:
                  continue
              if condition.op == FilterOperator.EQUAL:
                  id_filters.append(condition.value)
              elif condition.op == FilterOperator.IN:
                  id_filters.extend(condition.value)
  
      if vector_filter is not None:
          # similarity search
          query_payload = {
              "where": filters,
              "query_embeddings": vector_filter.value
              if vector_filter is not None
              else None,
              "include": include + ["distances"],
          }
          if limit is not None:
              query_payload["n_results"] = limit
  
          result = collection.query(**query_payload)
          ids = result["ids"][0]
          documents = result["documents"][0]
          metadatas = result["metadatas"][0]
          distances = result["distances"][0]
          embeddings = result["embeddings"][0]
  
      else:
          # general get query
          result = collection.get(
              ids=id_filters,
              where=filters,
              limit=limit,
              offset=offset,
              include=include,
          )
          ids = result["ids"]
          documents = result["documents"]
          metadatas = result["metadatas"]
          embeddings = result["embeddings"]
          distances = None
  
      # project based on columns
      payload = {
          TableField.ID.value: ids,
          TableField.CONTENT.value: documents,
          TableField.METADATA.value: metadatas,
          TableField.EMBEDDINGS.value: embeddings,
      }
  
      if columns is not None:
          payload = {column: payload[column] for column in columns}
  
      # always include distance
      if distances is not None:
          payload[TableField.DISTANCE.value] = distances
      return pd.DataFrame(payload)
  
imports: import sys
  from collections import OrderedDict
  from typing import List, Optional
  import pandas
  from mindsdb.integrations.handlers.chromadb_handler.settings import ChromaHandlerConfig
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  from mindsdb.integrations.libs.response import RESPONSE_TYPE
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerResponse
  from mindsdb.integrations.libs.response import HandlerStatusResponse
  from mindsdb.integrations.libs.vectordatabase_handler import FilterCondition, FilterOperator, TableField, VectorStoreHandler
  from mindsdb.interfaces.storage.model_fs import HandlerStorage
  from mindsdb.utilities import log
label_desc: Use image node_id 10 for calling the ChromaDBHandler obj's underlying member method code with example usage: obj.select(table_name, columns, conditions, offset, limit) and returns: pd