class_docstr: Validate a dataframe using a Pydantic schema.
  
  Attributes:
      df: dataframe to be validated
class_docstr_tok: ["Validate","a","dataframe","using","a","Pydantic","schema",".","Attributes",":","df",":","dataframe","to","be","validated"]
docstr: Args:
      schema: Pydantic schema
      batch_df: dataframe batch
  
  Returns:
      list of errors
docstr_tok: ["Args",":","schema",":","Pydantic","schema","batch_df",":","dataframe","batch","Returns",":","list","of","errors"]
code: def _validate_batch(self, schema, df_json: List[Dict]):
      """
      Args:
          schema: Pydantic schema
          batch_df: dataframe batch
  
      Returns:
          list of errors
      """
      try:
          # Create a Pydantic Validator to validate rows of dataframe
          class PdVal(BaseModel):
              df: List[schema]
  
          PdVal(df=df_json)
          return []
  
      except ValidationError as e:
          return e.errors()
  
file_path: pandas-ai/pandasai/helpers/df_validator.py
imports: from typing import List, Dict
  from pydantic import ValidationError
  from pydantic import BaseModel
  from pandasai.helpers.df_info import DataFrameType, df_type
label_desc: Use image node_id 2 for calling the DfValidator obj's underlying member method code with example usage: obj._validate_batch(schema, df_json) and returns: list, e