class_docstr: SnowFlake connectors are used to connect to SnowFlake Data Cloud.
class_docstr_tok: ["SnowFlake","connectors","are","used","to","connect","to","SnowFlake","Data","Cloud","."]
docstr: Return the head of the data source that the connector is connected to.
  This information is passed to the LLM to provide the schema of the data source.
  
  Returns:
      DataFrame: The head of the data source.
docstr_tok: ["Return","the","head","of","the","data","source","that","the","connector","is","connected","to",".","This","information","is","passed","to","the","LLM","to","provide","the","schema","of","the","data","source",".","Returns",":","DataFrame",":","The","head","of","the","data","source","."]
code: def head(self):
      """
      Return the head of the data source that the connector is connected to.
      This information is passed to the LLM to provide the schema of the data source.
  
      Returns:
          DataFrame: The head of the data source.
      """
  
      if self.logger:
          self.logger.log(
              f"Getting head of {self._config.table} "
              f"using dialect {self._config.dialect}"
          )
  
      # Run a SQL query to get all the columns names and 5 random rows
      query = self._build_query(limit=5, order="RANDOM()")
  
      # Return the head of the data source
      return pd.read_sql(query, self._connection)
  
file_path: pandas-ai/pandasai/connectors/snowflake.py
imports: import pandas
  from .base import BaseConnectorConfig, SnowFlakeConnectorConfig
  from sqlalchemy import create_engine
  from functools import cache
  from typing import Union
  from .sql import SQLConnector
label_desc: Use image node_id 4 for calling the SnowFlakeConnector obj's underlying member method code with example usage: obj.head() and returns: pd