Skip to main content

check_suffix

A decorator to check the file suffix of a given file path. Parameters:
  • valid_suffix (str): The required file suffix.
Returns: Callable: The decorator function.

PandasReader

init

Initializes the PandasReader class. Parameters:
  • config (Optional[Dict[str, Any]], optional): The configuration dictionary that can include LLM API settings for LLM-based processing. If not provided, no LLM will be configured by default. You can customize the LLM configuration by providing a ‘llm’ key in the config dictionary. (default: :obj:None)

load

Loads a file or DataFrame and returns a DataFrame or SmartDataframe object. If an LLM is configured in the config dictionary, a SmartDataframe will be returned, otherwise a regular pandas DataFrame will be returned. Parameters:
  • data (Union[DataFrame, str]): The data to load. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: Union[DataFrame, SmartDataframe]: The DataFrame or SmartDataframe object.

read_csv

Reads a CSV file and returns a DataFrame. Parameters:
  • file_path (str): The path to the CSV file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_excel

Reads an Excel file and returns a DataFrame. Parameters:
  • file_path (str): The path to the Excel file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_json

Reads a JSON file and returns a DataFrame. Parameters:
  • file_path (str): The path to the JSON file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_parquet

Reads a Parquet file and returns a DataFrame. Parameters:
  • file_path (str): The path to the Parquet file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_sql

Reads a SQL file and returns a DataFrame. Returns: DataFrame: The DataFrame object.

read_table

Reads a table and returns a DataFrame. Parameters:
  • file_path (str): The path to the table. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_clipboard

Reads a clipboard and returns a DataFrame. Returns: DataFrame: The DataFrame object.

read_html

Reads an HTML file and returns a DataFrame. Parameters:
  • file_path (str): The path to the HTML file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_feather

Reads a Feather file and returns a DataFrame. Parameters:
  • file_path (str): The path to the Feather file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_stata

Reads a Stata file and returns a DataFrame. Parameters:
  • file_path (str): The path to the Stata file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_sas

Reads a SAS file and returns a DataFrame. Parameters:
  • file_path (str): The path to the SAS file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_pickle

Reads a Pickle file and returns a DataFrame. Parameters:
  • file_path (str): The path to the Pickle file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_hdf

Reads an HDF file and returns a DataFrame. Parameters:
  • file_path (str): The path to the HDF file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.

read_orc

Reads an ORC file and returns a DataFrame. Parameters:
  • file_path (str): The path to the ORC file. *args (Any): Additional positional arguments. **kwargs (Dict[str, Any]): Additional keyword arguments.
Returns: DataFrame: The DataFrame object.