Pure Python lite version of Pandas DataFrame.
Project description
tinytable
Pure Python, lightweight DataFrame-like table for small datasets. Zero C extensions. Friendly API inspired by pandas, but tiny.
Installation
pip install tinytable
Supports Python 3.8–3.13.
Quickstart
from tinytable import Table, read_csv, read_excel, read_sqlite
# Read from files
t1 = read_csv('tests/data/people.csv')
t2 = read_excel('tests/data/people.xlsx', sheet_name='Sheet1')
t3 = read_sqlite('tests/data/data.db', 'people')
# Construct manually
t = Table({'id': [1, 2, 3], 'name': ['a', 'b', 'c']}, labels=[('r1',), ('r2',), ('r3',)])
# Column/row access
ids = t['id'] # Column
row1 = t[0] # Row
subset = t[['id']] # New Table with only id
# Filter and slice
adults = t[t['id'] > 1] # boolean filter
head = t[:2] # slice rows
# Edit
t.edit_value('name', 0, 'z')
t2 = t.edit_column('id', [10, 20, 30], inplace=False)
# IO
t.to_csv('out.csv')
t.to_excel('out.xlsx', sheet_name='Sheet1')
t.to_sqlite('out.db', table_name='people', primary_key='id', replace_table=True)
Features
- Pure Python: No C extensions, easy to install and debug
- Pandas-like API: Familiar interface for data manipulation
- Multiple I/O formats: CSV, Excel, SQLite support
- Type-safe: Full mypy type checking support
- Well-tested: Comprehensive test suite with 76% coverage (235 tests)
- Modern packaging: Uses
pyproject.tomland supports Python 3.8-3.13
API surface
Table: core container with column/row operations,head,tail, joins, group stats, NA ops.- Readers:
read_csv,read_excel,read_sqlite. - Writers:
to_csv,to_excel,to_sqlite.
Development
This package has been fully modernized with:
- ✅ Modern Python packaging (
pyproject.toml) - ✅ Comprehensive testing (pytest with 235 tests, all passing)
- ✅ Type safety (mypy strict checking)
- ✅ Code quality (ruff linting and formatting)
- ✅ CI/CD (GitHub Actions)
- ✅ 100% backward compatibility
Contributing
PRs welcome. Run tests and linters:
pip install -e .[dev]
pytest -q
mypy tinytable
ruff check .
ruff format .
Notes
- This release (v0.18.1) includes comprehensive modernization, bug fixes, improved type safety, and robust empty table handling.
- See
CHANGELOG.mdfor detailed release notes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tinytable-0.18.1.tar.gz
(28.5 kB
view details)
Built Distribution
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 tinytable-0.18.1.tar.gz.
File metadata
- Download URL: tinytable-0.18.1.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86f0556a025fb3ee02dad30c62c589a764fe83759db943eb9247e272ba72e97f
|
|
| MD5 |
48c70bfb76e0aed85a6f4e18c04f4b08
|
|
| BLAKE2b-256 |
245d00d35657b9d01d22be24fa2faa509377b92b251ac046bd8562d8457fe628
|
File details
Details for the file tinytable-0.18.1-py3-none-any.whl.
File metadata
- Download URL: tinytable-0.18.1-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c394af08007812fa121955db1bea3c087766de4cc9c9e392561a82a435300762
|
|
| MD5 |
fb5e7e8f1aa1bf7b8d372ee929e0653c
|
|
| BLAKE2b-256 |
7f50adfcaabcbe36395989e6703382eec8015065f4824a37f2b3828c96cc73fe
|