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-2026.3.4.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-2026.3.4-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tabcamel-2026.3.4.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-2026.3.4.tar.gz
Algorithm Hash digest
SHA256 223387aaed845fa0c7ada4ad2c450f420a881c7cd988d21f8a1b56b22984dd65
MD5 e4a2e6ec67bcce6dc318a555fa73515b
BLAKE2b-256 c2852bbdfe4ea03886e71d0048180e034b7348f77942c3f78233fafb61d30b76

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: tabcamel-2026.3.4-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-2026.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab4385d6e4d8032e3d2f36072814f70e92c5fb39f6e519edf5c88e7d335ba2a
MD5 ccdbeb7b228aacad584c264adeda8b5f
BLAKE2b-256 0acdfbf466a861b8ce42a85ce9b7e62281a1ce0ddd6bb3e91a3c8fd7748dad39

See more details on using hashes here.

Provenance

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