# UnstructuredCSVLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/csv_loader/UnstructuredCSVLoader)

Load `CSV` files using `Unstructured`.

Like other
Unstructured loaders, UnstructuredCSVLoader can be used in both
"single" and "elements" mode. If you use the loader in "elements"
mode, the CSV file will be a single Unstructured Table element.
If you use the loader in "elements" mode, an HTML representation
of the table will be available in the "text_as_html" key in the
document metadata.

Examples
--------
from langchain_community.document_loaders.csv_loader import UnstructuredCSVLoader

loader = UnstructuredCSVLoader("stanley-cups.csv", mode="elements")
docs = loader.load()

## Signature

```python
UnstructuredCSVLoader(
    self,
    file_path: str,
    mode: str = 'single',
    **unstructured_kwargs: Any = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file_path` | `str` | Yes | The path to the CSV file. |
| `mode` | `str` | No | The mode to use when loading the CSV file. Optional. Defaults to "single". (default: `'single'`) |
| `**unstructured_kwargs` | `Any` | No | Keyword arguments to pass to unstructured. (default: `{}`) |

## Extends

- `UnstructuredFileLoader`

## Constructors

```python
__init__(
    self,
    file_path: str,
    mode: str = 'single',
    **unstructured_kwargs: Any = {},
)
```

| Name | Type |
|------|------|
| `file_path` | `str` |
| `mode` | `str` |


---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/csv_loader.py#L190)