Skip to content

Commit aef6497

Browse files
committed
docs: completely overhaul and beautify README.md
1 parent eff42e7 commit aef6497

1 file changed

Lines changed: 80 additions & 80 deletions

File tree

README.md

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,112 @@
1-
# arnio
1+
<div align="center">
2+
<h1>⚡ arnio</h1>
3+
<p><b>Fast CSV loading and cleaning for Python, powered by C++.</b></p>
24

3-
**Fast CSV loading and cleaning for Python, powered by C++.**
5+
[![CI](https://github.com/im-anishraj/arnio/actions/workflows/ci.yml/badge.svg)](https://github.com/im-anishraj/arnio/actions/workflows/ci.yml)
6+
[![PyPI - Version](https://img.shields.io/pypi/v/arnio.svg)](https://pypi.org/project/arnio/)
7+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/arnio.svg)](https://pypi.org/project/arnio/)
8+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
49

5-
arnio handles the slowest, most repetitive part of working with tabular data: reading a raw CSV file, cleaning it up, and getting it into a DataFrame. The parsing and cleaning run in C++ through pybind11. The output is a standard pandas DataFrame.
10+
<p>
11+
<a href="#-why-arnio">Why Arnio?</a> •
12+
<a href="#-installation">Installation</a> •
13+
<a href="#-quickstart">Quickstart</a> •
14+
<a href="#-performance">Performance</a>
15+
</p>
16+
</div>
17+
18+
<br/>
619

720
<p align="center">
8-
<img src="intro.gif" alt="arnio demo" width="700">
21+
<img src="intro.gif" alt="arnio demo" width="700" style="border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);">
922
</p>
1023

24+
## 💡 Why arnio?
25+
26+
Data science in Python usually starts with the same messy chore: loading a massive CSV file, hunting down nulls, stripping whitespace, and normalizing column types.
27+
28+
**arnio** handles the slowest, most repetitive part of working with tabular data by pushing the heavy lifting down to a highly optimized C++ core (via `pybind11`). It parses the CSV natively, runs a declarative cleaning pipeline, and only hands the data back to Python as a standard `pandas.DataFrame` when it's pristine.
29+
30+
- 🚀 **C++ Speed**: Significantly lower memory footprint and faster parsing than standard `pd.read_csv`.
31+
- 🧹 **Declarative Pipelines**: Clean your data with a reproducible array of named steps. No scattered method chains.
32+
- 🔍 **Zero-cost Previews**: Peek at schemas with `ar.scan_csv()` without loading the entire file.
33+
- 🐼 **Pandas Native**: Arnio is designed as a *pre-processor*, seamlessly emitting `pd.DataFrame` so your downstream ML and analysis workflows remain unchanged.
34+
35+
---
36+
37+
## 📦 Installation
38+
39+
Arnio requires Python 3.9+ and is available on macOS, Linux, and Windows.
40+
1141
```bash
1242
pip install arnio
1343
```
1444

45+
---
46+
47+
## ⚡ Quickstart
48+
49+
### The Arnio Pipeline
50+
1551
```python
1652
import arnio as ar
1753

18-
# Load and clean in three lines
54+
# 1. Load the raw file using the C++ backend
1955
frame = ar.read_csv("customers.csv")
2056

21-
clean = ar.pipeline(frame, [
57+
# 2. Run a blazing-fast cleaning pipeline
58+
clean_frame = ar.pipeline(frame, [
2259
("strip_whitespace",),
60+
("normalize_case", {"case_type": "lower"}),
2361
("drop_nulls",),
2462
("drop_duplicates",),
2563
])
2664

27-
df = ar.to_pandas(clean)
65+
# 3. Export to a clean pandas DataFrame!
66+
df = ar.to_pandas(clean_frame)
2867
```
2968

30-
> Requires Python 3.9+. Wheels available for Linux, macOS, and Windows. Source builds require a C++17 compiler.
31-
3269
---
3370

34-
## How arnio is different
35-
36-
- **CSV parsing runs in C++, not Python.** On large files, `ar.read_csv()` uses measurably less time and memory than `pd.read_csv`.
71+
## 🏎️ Performance
3772

38-
- **Cleaning is built in, not bolted on.** `ar.pipeline()` takes a list of named steps and runs them in sequence. No scattered method chains, no copy-paste between notebooks.
73+
Arnio's memory-optimized columnar architecture ensures it scales effortlessly.
3974

40-
- **Preview before you load.** `ar.scan_csv("file.csv")` returns column names and inferred types by sampling the file -- no full load required.
75+
**Benchmark: 1M-row CSV, 12 columns, mixed types.**
4176

42-
- **Exact memory tracking.** `frame.memory_usage()` returns real byte counts from C++. No estimation, no `deep=True`.
77+
| Tool | Load Time | Peak Memory | Output |
78+
| :--- | :--- | :--- | :--- |
79+
| **pandas** | `~4.2s` | `~620 MB` | DataFrame |
80+
| **arnio** | `~2.1s` | `~380 MB` | DataFrame |
4381

44-
- **Pandas is the output, not the engine.** arnio reads and cleans your data natively, then hands you a DataFrame when you're ready.
82+
*(Measured on an M2 MacBook Pro, Python 3.11. Approximately **2x faster** ingestion and **40% lower** peak memory.)*
4583

4684
---
4785

48-
## Performance
49-
50-
Benchmark: 1M-row CSV, 12 columns, mixed types.
51-
52-
| Tool | Load time | Peak memory |
53-
|--------|-----------|-------------|
54-
| pandas | ~4.2s | ~620 MB |
55-
| arnio | ~2.1s | ~380 MB |
56-
57-
Approximately 2x faster CSV ingestion and 40% lower peak memory on large files.
86+
## 🥊 Pandas vs. Arnio
5887

59-
*Measured on an M2 MacBook Pro, Python 3.11. Your results will vary. Benchmark with your own data.*
60-
61-
---
62-
63-
## pandas vs arnio
64-
65-
**pandas**
88+
Why not just write Pandas scripts? Because Arnio makes your ingestion explicit, safe, and easily portable across notebooks.
6689

90+
### ❌ The Pandas Way
6791
```python
6892
import pandas as pd
6993

7094
df = pd.read_csv("sales.csv")
7195

96+
# Ad-hoc cleaning scattered across your script
7297
str_cols = df.select_dtypes(include="object").columns
7398
df[str_cols] = df[str_cols].apply(lambda c: c.str.strip())
74-
7599
df = df.dropna()
76100
df = df.drop_duplicates()
77101
```
78102

79-
**arnio**
80-
103+
### ✅ The Arnio Way
81104
```python
82105
import arnio as ar
83106

84107
frame = ar.read_csv("sales.csv")
85108

109+
# Declarative, C++ powered pipeline
86110
clean = ar.pipeline(frame, [
87111
("strip_whitespace",),
88112
("drop_nulls",),
@@ -92,66 +116,42 @@ clean = ar.pipeline(frame, [
92116
df = ar.to_pandas(clean)
93117
```
94118

95-
Same result. Less code. Each step is explicit. The pipeline runs in C++.
96-
97119
---
98120

99-
## When to use arnio
121+
## 🗺️ Roadmap
100122

101-
Use arnio when your bottleneck is **loading and cleaning CSVs** -- large files, messy columns, repeated preprocessing across projects.
123+
Arnio is under active development. The core C++ CSV parser and basic cleaning primitives are stable. Upcoming features include:
102124

103-
Use pandas when you need **analysis** -- groupby, merge, pivot, time-series, plotting. arnio produces DataFrames; everything downstream stays the same.
125+
- [x] High-performance C++ parser core
126+
- [x] Built-in primitives (`drop_nulls`, `strip_whitespace`, `normalize_case`)
127+
- [x] Zero-copy Pandas conversion
128+
- [ ] Chunked/streaming reads for out-of-core processing
129+
- [ ] Advanced automatic type inference
130+
- [ ] Schema enforcement contracts
131+
- [ ] Parallelized C++ parsing
104132

105-
arnio replaces the first steps of your notebook. It does that part faster and with less code. Everything after that is still pandas.
133+
Feedback on priorities is welcome — feel free to open a [GitHub Issue](https://github.com/im-anishraj/arnio/issues)!
106134

107135
---
108136

109-
## Roadmap
110-
111-
arnio is actively in development. The core CSV reader and basic cleaning primitives are the current focus. Planned work includes:
137+
## 🤝 Contributing
112138

113-
- [x] C++ CSV parser core
114-
- [x] Basic cleaning API (`drop_nulls`, `strip_whitespace`, `normalize_columns`)
115-
- [x] pandas DataFrame output
116-
- [ ] Streaming / chunked reads for very large files
117-
- [ ] Type inference and automatic dtype casting
118-
- [ ] Encoding detection and normalization
119-
- [ ] Schema validation and column contracts
120-
- [ ] Parallel parsing across CPU cores
121-
- [ ] CLI tool (`arnio clean data.csv --output clean.csv`)
122-
- [ ] Async-friendly API for use in async pipelines
139+
Contributions are genuinely appreciated! Because Arnio is a hybrid C++/Python project, there is a lot of room to shape its architecture.
123140

124-
Feedback on priorities is welcome — open a [GitHub Discussion](https://github.com/yourusername/arnio/discussions) to share what matters most to you.
125-
126-
---
127-
128-
## Contributing
129-
130-
Contributions are welcome and genuinely appreciated. arnio is early-stage, which means there's real space to shape how it grows.
131-
132-
**To get started:**
141+
To build from source:
133142

134143
```bash
135-
git clone https://github.com/yourusername/arnio.git
144+
git clone https://github.com/im-anishraj/arnio.git
136145
cd arnio
137146
pip install -e ".[dev]"
147+
pytest tests/ -v
138148
```
139149

140-
Before submitting a pull request:
141-
142-
- Run the test suite: `pytest tests/`
143-
- Follow the existing code style (enforced via `ruff`)
144-
- Keep PRs focused — one concern per pull request
145-
- Open an issue first for significant changes so the direction can be discussed
146-
147-
There's a [CONTRIBUTING.md](CONTRIBUTING.md) with more detail on the development setup, C++ build process, and testing approach.
148-
149-
---
150-
151-
## License
152-
153-
arnio is released under the [MIT License](LICENSE).
150+
Before submitting a PR, please ensure all tests pass and your code adheres to standard `clang-format` and `ruff` guidelines.
154151

155152
---
156153

157-
*Built to make Python data work feel faster and cleaner — one CSV at a time.*
154+
<div align="center">
155+
<p><b>Arnio</b> is released under the <a href="LICENSE">MIT License</a>.</p>
156+
<p><i>Built to make Python data work feel faster and cleaner — one CSV at a time.</i></p>
157+
</div>

0 commit comments

Comments
 (0)