Tablib: format-agnostic tabular dataset library
_____ ______ ___________ ______ __ /_______ ____ /_ ___ /___(_)___ /_ _ __/_ __ `/__ __ \__ / __ / __ __ \ / /_ / /_/ / _ /_/ /_ / _ / _ /_/ / \__/ \__,_/ /_.___/ /_/ /_/ /_.___/
Tablib is a format-agnostic tabular dataset library, written in Python. It is a full python module which doubles as a CLI application for quick dataset conversions.
Formats supported:
JSON
YAML
Excel
CSV
At this time, Tablib supports the export of it’s powerful Dataset object instances into any of the above formats. Import is underway.
Please note that tablib purposefully excludes XML support. It always will.
Features
Populate fresh data files:
headers = ('first_name', 'last_name', 'gpa')
data = [
('John', 'Adams', 4.0),
('George', 'Washington', 2.6),
('Henry', 'Ford', 2.3)
]
data = tablib.Dataset(*data, headers=headers)
# Establish file location and save
data.save('test.xls')
Intelligently add new rows:
data.append('Bob', 'Dylan', 3.2)
print data.headers
# >>> ('first_name', 'last_name', 'gpa')
Slice rows:
print data[0:1]
# >>> [('John', 'Adams', 4.0), ('George', 'Washington', 2.6)]
Slice columns by header:
print data['first_name'] # >>> ['John', 'George', 'Henry']
Manipulate rows by index:
del data[0]
print data[0:1]
# >>> [('George', 'Washington', 2.6), ('Henry', 'Ford', 2.3)]
Roadmap
Import datasets from CSV, JSON, YAML
Auto-detect import format
Plugin support
History
0.6.0 (2010-09-11)
Public Release.
Export Support for XLS, JSON, YAML, and CSV.
DataBook Export for XLS, JSON, and YAML.
Python Dict Property Support.
Metadata
Release files for tablib 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tablib-0.6.1.tar.gz | 8.2 kB | Without provenance | Details |
Release files / tablib-0.6.1.tar.gz
| Download URL | tablib-0.6.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b577bd60254d187630fbed8aacc0b75d9663a84bf89885d54642928321d341d
|
|
BLAKE2b-256 checksum How to use checksums |
51d24cdf3715d296b5b0231c0d94e67969f9becb989c71d456f20824d10d9aa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tablib 0.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.