Codebooks
Automatically generate codebooks from dataframes. Includes methods to:
- Infer variable type (as unique key, indicator, categorical, or continuous).
- Summarize values with histograms and KDEs.
- Generate a self-contained HTML report (may be extended to PDF or other formats in the future).
Usage:
codebooks -o output.html input.csv
Example
Adding variable descriptions
You can specify a csv file that maps variable names to descriptions using:
codebooks --desc descriptions.csv -o output.html input.csv
The csv file is expected to have two columns (variable, description).
License
3-Clause BSD (see LICENSE)
Tests
The test/ subdirectory contains a script to generate a synthetic data set, an integration test for the codebooks package, and a benchmark script used to test performance optimizations. You can run these with:
cd test
python dataset.py
codebooks --desc desc.csv dataset.csv
codebooks --desc desc.csv --parquet dataset.parquet
python benchmark.py
Authors
Mark Howison
http://mark.howison.org
Metadata
Release files for codebooks 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| codebooks-0.0.7.tar.gz | 13.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codebooks-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.4 kB
Release files / codebooks-0.0.7.tar.gz
| Download URL | codebooks-0.0.7.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a37e6ef0dfd2d796270f1806c55ffa6fab6f7a2855f576df1101c641952a6f6
|
|
BLAKE2b-256 checksum How to use checksums |
e0bb565354b489a2559c26b41deabd24f5787af22e05bd6381a8493ea837b64d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / codebooks-0.0.7-py3-none-any.whl
| Download URL | codebooks-0.0.7-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68549ea5dba1f6c079894726745e17580496c2f35f8880f87ca23da0f1240f9f
|
|
BLAKE2b-256 checksum How to use checksums |
d73bb447af2cc6e389d382d788227bf4ad57e6a22766ddd7ae3cfdf1829f0167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|