This project has been archived by its maintainers, and is no longer receiving any updates.
datashaper
This project provides a collection of utilities for doing lightweight data wrangling.
There are two goals of the project:
- Create a shareable client/server schema for serialized wrangling instructions
- Maintain an implementation of a basic wrangling engine (based on Arquero) and in the case of python implemented in Pandas
Building
- You need to install poetry python package manager.
- Run:
poetry install
Usage
This project is intended to be used as a library for lightweight data wrangling. In the examples folder there is a Notebook which provides several examples of how to create data wrangling pipelines and how to read json specifications that can be generated by the js implementation.
Example of joining two tables:
from datashaper.pipeline import Pipeline
import datashaper.types as types
import pandas as pd
# id name
# 1 bob
# 2 joe
# 3 jane
parents = pd.DataFrame({
"id": [1, 2, 3],
"name": ['bob', 'joe', 'jane']
})
# id kid
# 1 billy
# 1 jill
# 2 kaden
# 2 kyle
# 3 moe
kids = pd.DataFrame({
"id": [1, 1, 2, 2, 3],
"kid": ['billy', 'jill', 'kaden', 'kyle', 'moe']
})
pipeline = Pipeline()
pipeline.add_dataset('parents', parents)
pipeline.add_dataset('kids', kids)
pipeline.add(Step(
verb=Verb.join,
input="parents",
output="output",
args={
"other": "kids",
"on":["id"]
}
))
# id name kid
# 1 bob billy
# 1 bob jill
# 2 joe kaden
# 2 joe kyle
# 3 jane moe
result = pipeline.run()
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Metadata
Release files for datashaper 0.0.49
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 |
|---|---|---|---|---|
| datashaper-0.0.49.tar.gz | 36.4 kB | Without provenance | Details for datashaper-0.0.49.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datashaper-0.0.49-py3-none-any.whl | Python 3 | none | any | Details for datashaper-0.0.49-py3-none-any.whl |
Total release size: 108.4 kB
Release files / datashaper-0.0.49.tar.gz
| Download URL | datashaper-0.0.49.tar.gz |
|---|---|
| Size | 36.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05bfba5964474a62bdd5259ec3fa0173d01e365208b6a4aff4ea0e63096a7533
|
|
BLAKE2b-256 checksum How to use checksums |
e6d328663b75307748e36a026d32a6d60e0725ed054f28cc5a72fa418ac166ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / datashaper-0.0.49-py3-none-any.whl
| Download URL | datashaper-0.0.49-py3-none-any.whl |
|---|---|
| Size | 72.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f58cabacc834765595c6e04cfbbd05be6af71907e46ebc7a91d2a4add7c2643
|
|
BLAKE2b-256 checksum How to use checksums |
cbb9f5cebf0fd2ebee6449663989f275f186928c92b94d05c9503c9ccc814757
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for datashaper 0.0.49
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.