CSVLoader document loaders. For detailed documentation of all CSVLoader features and configurations head to the API reference.
This example goes over how to load data from CSV files. The second argument is the column name to extract from the CSV file. One document will be created for each row in the CSV file. When column is not specified, each row is converted into a key/value pair with each key/value pair outputted to a new line in the document’s pageContent. When column is specified, one document is created for each row, and the value of the specified column is used as the document’s pageContent.
Overview
Integration details
| Class | Package | Compatibility | Local | PY support |
|---|---|---|---|---|
| CSVLoader | @langchain/community | Node-only | ✅ | ✅ |
Setup
To accessCSVLoader document loader you’ll need to install the @langchain/community integration, along with the d3-dsv@2 peer dependency.
Installation
The LangChain CSVLoader integration lives in the@langchain/community integration package.