Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
CSV tool allows you to read, write, and query CSV files.
Installation
pip install "praisonai[tools]"
Quick Start
from praisonai_tools import CSVTool
# Initialize
csv_tool = CSVTool()
# Read CSV
data = csv_tool.read("data.csv")
print(data)
Usage with Agent
from praisonaiagents import Agent
from praisonai_tools import CSVTool
agent = Agent(
name="DataAnalyst",
instructions="You help analyze CSV data.",
tools=[CSVTool()]
)
response = agent.chat("Read sales.csv and summarize the data")
print(response)
Available Methods
read(path)
Read a CSV file.
from praisonai_tools import CSVTool
csv_tool = CSVTool()
data = csv_tool.read("data.csv")
write(path, data)
Write data to a CSV file.
csv_tool.write("output.csv", [{"name": "Alice", "age": 30}])