Skip to content

API Reference parrot_loaders.csv

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_loaders.csv

View source

Class CSVLoader

CSV Loader that creates one JSON Document per row using pandas.

This loader reads CSV files with pandas and converts each row into a separate Document with JSON content. Perfect for creating searchable knowledge bases from tabular data where each row represents an entity or record.

Features:

  • One document per CSV row
  • JSON serialization of row data
  • Configurable pandas read options
  • Row indexing and metadata
  • Header preservation
  • Data type inference
  • Error handling for malformed data
Parameter Type Default Description
source Optional[Union[pd.DataFrame, PurePath, List[PurePath]]] None
tokenizer Union[str, Callable] None
text_splitter Union[str, Callable] None
source_type str 'file'
separator Optional[str] None
encoding str 'utf-8'
header Union[int, List[int], str] 0
index_col Union[int, str, List, bool] False
usecols Optional[List] None
dtype Optional[Dict] None
skip_empty_rows bool True
skip_na_rows bool False
fill_na_value Optional[str] None
json_ensure_ascii bool False
json_indent Optional[int] 2
max_rows Optional[int] None
skip_rows Optional[int] None
include_row_index bool True
include_headers_in_content bool False
row_prefix str 'Row'
**kwargs {}

Attributes:

Attribute Type Description
extensions List[str]

Method CSVLoader.get_csv_info

Get information about a CSV file without loading all data.

get_csv_info(path: Union[str, PurePath]) -> Dict[str, Any]

Parameter Type Default Description
path Union[str, PurePath]

Returns: Dict[str, Any]

Method CSVLoader.estimate_documents_count

Estimate how many documents will be created from a CSV file.

estimate_documents_count(path: Union[str, PurePath]) -> int

Parameter Type Default Description
path Union[str, PurePath]

Returns: int

Method CSVLoader.get_configuration_summary

Get current loader configuration.

get_configuration_summary() -> Dict[str, Any]

Returns: Dict[str, Any]

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally