Skip to main content

Document loaders

Prerequisites

Overview​

Document loaders are designed to load document objects. LangChain has hundreds of integrations with various data sources to load data from: Slack, Notion, Google Drive, etc.

Available Integrations​

You can find available integrations on the Document Loaders Integrations page.

Interface​

Documents loaders implement the BaseLoader interface.

Each DocumentLoader has its own specific parameters, but they can all be invoked in the same way with the .load method or .lazy_load.

Here's a simple example:

from langchain_community.document_loaders.csv_loader import CSVLoader

loader = CSVLoader(
... # <-- Integration specific parameters here
)
data = loader.load()
API Reference:CSVLoader

or if working with large datasets, you can use the .lazy_load method:

for document in loader.lazy_load():
print(document)

Please see the following resources for more information:


Was this page helpful?