> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.loaders.pandas reader

<a id="camel.loaders.pandas_reader" />

<a id="camel.loaders.pandas_reader.check_suffix" />

## check\_suffix

```python theme={"system"}
def check_suffix(valid_suffixs: List[str]):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader" />

## PandasReader

```python theme={"system"}
class PandasReader:
```

<a id="camel.loaders.pandas_reader.PandasReader.__init__" />

### **init**

```python theme={"system"}
def __init__(self, config: Optional[Dict[str, Any]] = None):
```

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`)

<a id="camel.loaders.pandas_reader.PandasReader.load" />

### load

```python theme={"system"}
def load(
    self,
    data: Union['DataFrame', str],
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_csv" />

### read\_csv

```python theme={"system"}
def read_csv(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_excel" />

### read\_excel

```python theme={"system"}
def read_excel(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_json" />

### read\_json

```python theme={"system"}
def read_json(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_parquet" />

### read\_parquet

```python theme={"system"}
def read_parquet(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_sql" />

### read\_sql

```python theme={"system"}
def read_sql(self, *args: Any, **kwargs: Dict[str, Any]):
```

Reads a SQL file and returns a DataFrame.

**Returns:**

DataFrame: The DataFrame object.

<a id="camel.loaders.pandas_reader.PandasReader.read_table" />

### read\_table

```python theme={"system"}
def read_table(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_clipboard" />

### read\_clipboard

```python theme={"system"}
def read_clipboard(self, *args: Any, **kwargs: Dict[str, Any]):
```

Reads a clipboard and returns a DataFrame.

**Returns:**

DataFrame: The DataFrame object.

<a id="camel.loaders.pandas_reader.PandasReader.read_html" />

### read\_html

```python theme={"system"}
def read_html(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_feather" />

### read\_feather

```python theme={"system"}
def read_feather(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_stata" />

### read\_stata

```python theme={"system"}
def read_stata(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_sas" />

### read\_sas

```python theme={"system"}
def read_sas(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_pickle" />

### read\_pickle

```python theme={"system"}
def read_pickle(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_hdf" />

### read\_hdf

```python theme={"system"}
def read_hdf(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.

<a id="camel.loaders.pandas_reader.PandasReader.read_orc" />

### read\_orc

```python theme={"system"}
def read_orc(
    self,
    file_path: str,
    *args: Any,
    **kwargs: Dict[str, Any]
):
```

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.
