📦 dwrappr
A lightweight and extensible Python package for managing data, tailored for researchers working with structured data. In addition to general data management features, the package introduces a data structure specifically optimized for ML research. This common format enables researchers to efficiently test new algorithms and methods, streamlining collaboration and ensuring consistency in data management across projects.
🧩 Features
- 🗃️ Consistent dataset object structure for handling structured data in ML use cases
- 🔄 Support for building a file-based internal dataset collaboration platform for researchers
- 🧰 General utilities for managing data like saving and loading
🚀 Quickstart
For executing the quickstart examples and get an overview of dwrappr's functionalities, please have a look at IEEE_examples.
Additional functionalities are showcased in:
- loading_dataset_from_file.py: Shows how to load a dataset from an existing dataset file
- scanning_folder_for_datasets.py: Shows how to scann a folder vor available datasets
- dataset_functionalities.py : Shows some of the main functionalities of the DataSet class.
👀 Functionality Ipnsights
Scan folder for dataset
DATASET_FOLDER = "./data/datasets/"
available_datasets = DataSet.get_available_datasets_in_folder(
DATASET_FOLDER
)
available_datasets.T
Loading specific dataset
DATASET_FILEPATH = "./data/datasets/manufacturing_process_ds.joblib"
ds = DataSet.load(DATASET_FILEPATH)
Generating dataset from raw data
RAW_DATA_FILEPATH= "./data/raw_data.csv"
#load raw data into pandas.DataFrame
df = pd.read_csv(RAW_DATA_FILEPATH)
"""
<some manual dataset preprocessing steps
like dropping missing values and chaning dtypes>
"""
#define metaData
meta = DataSetMeta(
name = "example_dataset",
synthetic_data=True,
time_series=False,
feature_names=["feature"],
target_names=["target"]
)
#generate DataSet
ds = DataSet.from_dataframe(
df=df,
meta=meta
)
#saving dataset
ds.save("./data/example_dataset.joblib", drop_meta_json=True)
Split dataset
(train/test-split)
import numpy as np
n_instances = 100
# Create the 'product_id' feature with 3 different categorical values
product_ids = np.random.choice(['1001', '2002', '3003', '4004', '5005', '6006', '7007'], size=n_instances)
# Generate two additional numeric features
feature_1 = np.random.rand(n_instances) * 100 # Random numbers between 0 and 100
feature_2 = np.random.rand(n_instances) * 50 # Random numbers between 0 and 50
# Generate a numeric target
target = feature_1 * 0.5 + feature_2 * 0.3 + np.random.randn(n_instances) * 5 # Adding some noise
# Create a DataFrame
df = pd.DataFrame({
'product_id': product_ids,
'feature_1': feature_1,
'feature_2': feature_2,
'target': target
})
ds = DataSet.from_dataframe(
df=df,
meta = DataSetMeta(
name = "example_dataset",
synthetic_data=True,
time_series=False,
feature_names=["product_id", "feature_1", "feature_2"],
target_names=["target"]
)
)
train_ds, test_ds = ds.split_dataset(
first_ds_size=0.5,
shuffle=True,
group_by_features=["product_id"]
)
📄 Help
See Documentation for details.
🛠️ Package Installation
pip install dwrappr: grundlegende Datenverwaltungsfunktionenpip install "dwrappr[ml]": zusätzliche ML-spezifische Funktionen
(keep package updated with pip install dwrappr --upgrade)
🔧 Maintainer
This project is maintained by Nils
Metadata
Release files for dwrappr 1.0.17
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 |
|---|---|---|---|---|
| dwrappr-1.0.17.tar.gz | 21.5 kB | Without provenance | Details for dwrappr-1.0.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dwrappr-1.0.17-py3-none-any.whl | Python 3 | none | any | Details for dwrappr-1.0.17-py3-none-any.whl |
Total release size: 42.8 kB
Release files / dwrappr-1.0.17.tar.gz
| Download URL | dwrappr-1.0.17.tar.gz |
|---|---|
| Size | 21.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41a5fb30b688a1a51b1ab780e52bf75d395f0461ddf244dd9294a736879bb1e2
|
|
BLAKE2b-256 checksum How to use checksums |
37a6862de98bd43c3012d6314e76989fb7fd90a479951864608070aedbc1770a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / dwrappr-1.0.17-py3-none-any.whl
| Download URL | dwrappr-1.0.17-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff5237f3719647f254e85052b58c64d25cf862529c0987f98ff96574efd1b0f0
|
|
BLAKE2b-256 checksum How to use checksums |
28dff8762e91db7cb6b3b236eb85baa46401322bf6bd8c5c6080b2838706bdc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for dwrappr 1.0.17
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.