docstr: Format dataframe generate against a user query
  Args:
      result (dict): result contains type and value
  Returns:
      Any: Returns depending on the user input
docstr_tok: ["Format","dataframe","generate","against","a","user","query","Args",":","result","(","dict",")",":","result","contains","type","and","value","Returns",":","Any",":","Returns","depending","on","the","user","input"]
code: def format_dataframe(self, result: dict) -> Any:
      """
      Format dataframe generate against a user query
      Args:
          result (dict): result contains type and value
      Returns:
          Any: Returns depending on the user input
      """
      from ..smart_dataframe import SmartDataframe
  
      df = result["value"]
      if self._context.engine == "polars" and polars_imported:
          import polars as pl
  
          df = pl.from_pandas(df)
  
      return SmartDataframe(
          df,
          config=self._context._config.__dict__,
          logger=self._context.logger,
      )
  
file_path: pandas-ai/pandasai/responses/response_parser.py
imports: from abc import ABC, abstractmethod
  from typing import Any
  from ..helpers.df_info import polars_imported
  from PIL import Image
  from pandasai.exceptions import MethodNotImplementedError
label_desc: Use image node_id 3 for calling the ResponseParser obj's underlying member method code with example usage: obj.format_dataframe(result) and returns: SmartDataframe