Skip to main content

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

Project description

TabCamel

Test In Colab PyPI version Last Commit 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.10.28.tar.gz (2.0 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.10.28-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tabcamel-2025.10.28.tar.gz
Algorithm Hash digest
SHA256 ab3067f55bc4aea11aaac9a04139f3070ed5ee7a6d22ae6ae132abf0ae21caf3
MD5 76e462bb9c423c75c887774eccfde228
BLAKE2b-256 41b8aeeeda32e51f49d82142103ece20124e614b65286713d1a565450433e9eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabcamel-2025.10.28.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.10.28-py3-none-any.whl.

File metadata

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

File hashes

Hashes for tabcamel-2025.10.28-py3-none-any.whl
Algorithm Hash digest
SHA256 10f4b4c75818ba9567ae6bcc536f600ddad9283afc908f2697958ee169b6d1b3
MD5 38cebd7f4a2bc018c0c9b4e087de758e
BLAKE2b-256 2ba09938d1cf6fc1913924e05a9e4a926d59848484891e53a29b6db6fe46b8ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabcamel-2025.10.28-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