> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Data Q&A

> Ask natural-language questions about CSV, JSON, TSV, YAML, XML, Parquet, Excel, and SQL dump files — single files or entire folders.

Ask questions about local data files — row counts, totals, top values, summaries, and more. Query a single file, an entire folder, or only specific formats.

## Natural language

```bash theme={null}
arka ask data users.csv "how many rows?"
arka ask data ./data/ "what is total revenue?"
data_ask reports/ "summarize all files"
data_ask folder ./exports --question "how many records total?"
arka analyze csv files in data/ "top 10 products"
arka query_data sales.json "what is total revenue by category?"
```

## CLI commands

| Command                                                          | Description                         |
| ---------------------------------------------------------------- | ----------------------------------- |
| `data_ask users.csv "how many rows?"`                            | Ask a question about a file         |
| `data_ask ./data/ --format csv "average salary?"`                | Query only CSV files in a folder    |
| `data_ask ./reports/ --formats csv,json "list all columns"`      | Filter by multiple formats          |
| `data_ask folder ./exports --question "how many records total?"` | Explicit folder mode                |
| `ask_data sales.json "total by category"`                        | Alias for `data_ask`                |
| `query_data report.tsv`                                          | Summarize when no question is given |
| `analyze_data data.jsonl "top 5 products"`                       | Alias for `data_ask`                |

## View CSV as a colored table

For **display** (not Q\&A), use `view_data` — inspired by tools like `csvlook` / pretty printers:

```bash theme={null}
view_data papers.csv
view_csv papers.csv --plain
show csv papers.csv as json
cat data.tsv | view_data --formats csv,yaml
```

Colored columns print in the terminal; optional `--formats` writes exports under `~/arka-generated/` (override with `DATA_OUTPUT_DIR`). Analytic questions still route to `data_ask`.

## Supported formats

`csv`, `json`, `jsonl`, `tsv`, `yaml`, `yml`, `xml`, `parquet`, `xlsx`, `xls`, `sql`

Optional dependencies for richer parsing:

| Format       | Package                |
| ------------ | ---------------------- |
| Parquet      | `pyarrow` or `pandas`  |
| Excel (xlsx) | `openpyxl` or `pandas` |
| YAML         | `pyyaml`               |

Without pandas, tabular files still load via the Python standard library (`csv`, `json`).

## Folders and format filters

When the path is a directory, Arka discovers data files by extension (non-recursive, top level only). Use `--format` or `--formats` to limit which types are loaded.

Large folders are capped for context size:

* Up to **5 files** per query
* Up to **500 rows** total across loaded files
* Per-file samples and column statistics when files are larger

## How it works

1. Detects file format(s) from extension(s), optionally filtered by `--format`
2. Loads rows from one or more files (sample + stats when truncated)
3. Sends structured context to the LLM with your question
4. Prints the answer in the terminal

This skill is for **querying existing files**. To create fake sample datasets, use [Generate data](/guides/generate-data).

## Examples

```bash theme={null}
data_ask ~/Downloads/orders.csv "what are the top 3 products by quantity?"
data_ask ./data/ --format csv "average salary?"
query_data metrics.jsonl "average latency by region"
analyze_data inventory.parquet
data_ask reports/ "summarize all files"
```


## Related topics

- [Personalize your Arka experience](/guides/personalize.md)
- [Chat, web search, and factual Q&A skills](/guides/chat.md)
- [Skills catalog: 70+ built-in Arka commands](/guides/skills.md)
- [Generate data](/guides/generate-data.md)
- [Bounded data collection](/guides/data-collection.md)
