class_docstr: Class to manage the configuration of the dataframe
docstr: Gets the import path for the dataframe
docstr_tok: ["Gets","the","import","path","for","the","dataframe"]
code: def _get_import_path(self):
      """
      Gets the import path for the dataframe
      """
  
      # Handle connectors
      if self._sdf.connector is not None:
          return self._sdf.connector.path
  
      # Return if already a string
      if isinstance(self.original_import, str):
          # Check if it is a csv or xlsx file
          if (
              self.original_import.endswith(".csv")
              or self.original_import.endswith(".parquet")
              or self.original_import.endswith(".xlsx")
              or self.original_import.startswith(
                  "https://docs.google.com/spreadsheets/"
              )
          ):
              return self.original_import
  
          # Otherwise, it means it is a dataframe imported from config
          raise ValueError(
              "Dataframe imported from config cannot be saved"
          )
  
      # Save df if pandas or polar
      dataframe_type = df_type(self.original_import)
      if dataframe_type == "pandas":
          file_path = self._create_save_path()
          self._sdf.dataframe.to_parquet(file_path)
      elif dataframe_type == "polars":
          file_path = self._create_save_path()
          with open(file_path, "w") as f:
              self._sdf.dataframe.write_csv(f)
      else:
          raise ValueError("Unknown dataframe type")
  
      return file_path
  
file_path: pandas-ai/pandasai/helpers/df_config_manager.py
imports: import json
  import os
  import hashlib
  from pandasai.helpers.path import create_directory, find_closest, find_project_root
  from .df_info import df_type
label_desc: Use image node_id 4 for calling the DfConfigManager obj's underlying member method code with example usage: obj._get_import_path() and returns: file_path, self, self