A tiny, fast, Rust-backed transformation core for Python table data
Project description
🪶 feathertail
High-performance Python DataFrame library powered by Rust, designed for flexibility, speed, and clear schema handling.
✨ Features
- ✅ Build
TinyFramefrom Python dict records (from_dicts) - ✅ Support for nested types (
Mixed,OptMixed) and optional columns - ✅ Automatic type inference
- ✅ Fill missing values (
fillna) - ✅ Cast columns to different types (
cast_column) - ✅ Edit columns with custom Python functions (
edit_column) - ✅ Drop or rename columns
- ✅ Simple group-by aggregations with
TinyGroupBy - ✅ Export to Python dicts (
to_dicts) - ✅ Lightweight, fast, and pure Rust core
📦 Installation
pip install feathertail
Or, from local source:
pip install -e .
🧑💻 Usage
import feathertail as ft
records = [
{"name": "Alice", "age": 30, "city": "New York", "score": 95.5},
{"name": "Bob", "age": None, "city": "Paris", "score": 85.0},
{"name": "Charlie", "age": 25, "city": "New York", "score": None},
]
# Create frame
frame = ft.TinyFrame.from_dicts(records)
print(frame)
print(frame.to_dicts())
# Fill missing values
frame.fillna({"age": 20, "score": 0.0})
print(frame.to_dicts())
# Cast score column to float explicitly
frame.cast_column("score", float)
# Edit city column to uppercase
frame.edit_column("city", lambda x: x.upper() if x else x)
print(frame.to_dicts())
# Drop score column
frame.drop_columns(["score"])
print(frame.to_dicts())
# Rename name column
frame.rename_column("name", "full_name")
print(frame.to_dicts())
# Group by city
groupby = ft.TinyGroupBy(frame, keys=["city"])
print(groupby.key_list)
print(groupby.group_map)
# Count per group
count_frame = groupby.count(frame)
print(count_frame.to_dicts())
⚙️ Supported Types
| Type | Column variant |
|---|---|
| int | Int, OptInt |
| float | Float, OptFloat |
| bool | Bool, OptBool |
| str | Str, OptStr |
| mixed | Mixed, OptMixed |
🐉 Why "feathertail"?
In Fourth Wing, "feathertail" refers to a juvenile stage of dragons — smaller, golden, and known for their feathery tails rather than weaponized ones. Feathertail dragons, like Andarna, are characterized by gentleness, non-violence, and an elegant simplicity.
This library embodies those same principles: lightweight, non-destructive, and focused on providing clean, powerful tools for data transformation without heavy dependencies or unnecessary complexity.
❤️ Contributing
Contributions and ideas are always welcome! Open an issue or a pull request.
📄 License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file feathertail-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: feathertail-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 318.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89202f58cc4b6e7221d7b0a843c6641a160ec8ff6ed9de1a18f6621f14eabf02
|
|
| MD5 |
b5375bb026defc4d63a7b35ee3706b9b
|
|
| BLAKE2b-256 |
37785b229bc1b50aaba2be67c87cd996fd258f145ab9400c901905e184019989
|
File details
Details for the file feathertail-0.1.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: feathertail-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 312.8 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d98b2a6618f8fd088a8ae1ce027e430d5eb62645664d6e07939787276120d44f
|
|
| MD5 |
318e8ad1551bd27d5cc4a58797549cf4
|
|
| BLAKE2b-256 |
7b0a562be106a8866aca6f576c1ff849aba64d17565f696923487088f84051dc
|