TableSwift is a python package that can do different types of data wrangling, using LLMs with code generation.
This package currently supports three functions. To start using the package, first configurre with your API key.
ts.configure(api_key="your API key here.")
Or alternatively define yoru API key in the system environment using variable name TABLESWIFT_API_KEY.
To generate labels, use:
labeled_data = ts.generate_labels(instruction="label the input samples",
task="data_transformation",
column_name="name",
demonstrations=[{"Input": "sample1", "Output": "label1"},
{"Input": "sample2", "Output": "label2"}],
samples_to_label=[{"Input": "sample1", "Output": ""},
{"Input": "sample2", "Output": ""},
{"Input": "sample3", "Output": ""}])
To generate code, use:
code, router_code = ts.generate_code(instruction="Transform input into output",
task="data_transformation",
samples=[{"Input": "sample1", "Output": "label1"},
{"Input": "sample2", "Output": "label2"}],
lang="python")
There are also hyperparameters that can be overriden, to do so, use:
code, router_code = ts.generate_code(instruction="Transform input into output",
task="data_transformation",
samples=[{"Input": "sample1", "Output": "label1"},
{"Input": "sample2", "Output": "label2"}],
lang="python",
num_trials=1,
num_retry=3,
num_iterations=1)
A list of hyperparameters with their defaul value is:
DEFAULT_PARAMS = {
"use_data_router": True,
"num_trials": 2,
"num_retry": 3,
"seed": 42,
"num_iterations": 2,
"max_num_solutions": 3,
"limit_fallback": 20, # number of invalid data samples before fallback, should be a percentage in the future
"llm": "gpt-4o-mini"
}
Current package supports two languages: python and duckdb SQL. To generate python code use lang=python, and to generate duckdb SQL query, use lang=sql.
Current pakcage supports the following tasks, remember to match the task parameter with the following string.
"data_transformation"
"entity_matching"
"error_detection_spelling"
"value_imputation"
Metadata
Release files for tableswift 0.1.4
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 | Actions |
|---|---|---|---|---|
| tableswift-0.1.4.tar.gz | 86.3 kB | Without provenance | Details for tableswift-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tableswift-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for tableswift-0.1.4-py3-none-any.whl |
Total release size: 180.4 kB
Release files / tableswift-0.1.4.tar.gz
| Download URL | tableswift-0.1.4.tar.gz |
|---|---|
| Size | 86.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8334a6b8315ea9548e008b64763d48e6236209a2892a4e9ea21d0c1b23710fe
|
|
BLAKE2b-256 checksum How to use checksums |
7792ed865e6922df8e567643def3244f2bb3b00bef42d3f4700f8acc28cb3642
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.15
|
Release files / tableswift-0.1.4-py3-none-any.whl
| Download URL | tableswift-0.1.4-py3-none-any.whl |
|---|---|
| Size | 94.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ba80c898525c81f20657927039714104f12edabe08a11cc5a08c7a668ca2a07
|
|
BLAKE2b-256 checksum How to use checksums |
f54f2ee24d497a0437a0e966eade817a9ae01ae11b871a6de84118fee0be6c91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.15
|
Security for tableswift 0.1.4
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.