Skip to main content

TabCamel: A DataFrame-focused solution for tabular datasets in machine learning workflows

Project description

TabCamel

Test In Colab License Python 3.10+ Downloads

A DataFrame-focused solution for tabular datasets in machine learning workflows.

🎯 Features

  • TabularDataset: Comprehensive dataset class with sampling and splitting capabilities
  • Data Transformations: Scikit-learn compatible preprocessing transformations
  • Multi-source Loading: Support for local files and popular ML repositories
  • AutoGluon Integration: Seamless integration with AutoGluon for automated ML

🛠 Installation

pip install tabcamel

🚀 Quick Start

from tabcamel.data.dataset import TabularDataset

# Load a remote dataset
dataset = TabularDataset('iris', task_type='classification')

# Split into train/test sets
train_test = dataset.split('stratified', train_size=0.8)
train_data = train_test['train_set']
test_data = train_test['test_set']

print(train_data)

💽 Dataset Sources

TabCamel supports multiple data sources:

Remote Datasets

  • OpenML: 30+ popular datasets ('iris', 'adult', 'titanic', etc.)
  • UCI ML Repository: Classic datasets with proper metadata
  • scikit-learn: Built-in sklearn datasets ('diabetes', etc.)
  • pgmpy: Bayesian network datasets from pgmpy
  • bnlearn: datasets from bnlearn

Local Datasets

For local datasets, you have several options:

Option 1: Direct File Path

# Use full path to your dataset
dataset = TabularDataset('/path/to/your/data.csv', task_type='classification')

Option 2: Configure Data Directory

import tabcamel.utils.config as config

# Set up your data directory
local_dataset2path = {
    "local_data": "/path/to/your/data.csv",
}
config.set_local_data_path(local_dataset2path)

# Now use short names
dataset = TabularDataset('local_data', task_type='classification')

💻 Examples

Basic Usage

from tabcamel.data.dataset import TabularDataset

# Remote dataset
dataset = TabularDataset('adult', task_type='classification')

# Local dataset with full path
dataset = TabularDataset('/home/user/data/my_data.csv', task_type='regression')

# Local dataset with configured data directory
dataset = TabularDataset('my_data', task_type='classification')

Data Operations

# Dataset sampling
sample_result = dataset.sample('stratified', sample_size=1000)
sampled_data = sample_result['dataset_sampled']

# Dataset splitting
split_result = dataset.split('stratified', test_size=0.2)
train_set = split_result['train_set']
test_set = split_result['test_set']

# Access properties
print(f"Samples: {dataset.num_samples}")
print(f"Features: {dataset.num_features}")
print(f"Classes: {dataset.num_classes}")

📚 Citation

If you use TabCamel in your research, please cite:

@misc{tabcamel,
  title = {TabCamel: A DataFrame-focused solution for tabular datasets in machine learning workflows},
  author = {Xiangjian Jiang},
  year = {2025},
  howpublished = {\url{https://github.com/SilenceX12138/TabCamel}},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tabcamel-2025.8.8.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tabcamel-2025.8.8-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file tabcamel-2025.8.8.tar.gz.

File metadata

  • Download URL: tabcamel-2025.8.8.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tabcamel-2025.8.8.tar.gz
Algorithm Hash digest
SHA256 4ce15389288bc09c5c15d41fddae31c751621fbd85fd6055ec0337851e7a808c
MD5 a9607b8204eb101592e8178d0e0d5711
BLAKE2b-256 5891cb06831844e6a14ca49c827aeb939f9c2c101dfedd07861bcba1b24422dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabcamel-2025.8.8.tar.gz:

Publisher: pypi.yaml on SilenceX12138/TabCamel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tabcamel-2025.8.8-py3-none-any.whl.

File metadata

  • Download URL: tabcamel-2025.8.8-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tabcamel-2025.8.8-py3-none-any.whl
Algorithm Hash digest
SHA256 81a550b1b2e31f05fc3d48ff6d9ecdd9feeb1fcbd08f083502dbc0d827827705
MD5 f26ab235e465ca28a7c00193ece38eae
BLAKE2b-256 401cffbd005b09cb874c27b081627977d08626d3d40d91379c13a28b0df3941e

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabcamel-2025.8.8-py3-none-any.whl:

Publisher: pypi.yaml on SilenceX12138/TabCamel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page