Skip to main content

Sliq - Data cleaning, made effortless. An AI-powered data cleaning library to clean your datasets with just a few lines of code.

Project description

Sliq Python Library

Data cleaning, made effortless.

Sliq is a Python library that provides a simple interface to clean your datasets using AI. With just a few lines of code, you can clean messy data, handle missing values, fix inconsistencies, and prepare your data for analysis or machine learning.

Installation

pip install sliq

To install Sliq locally for development

pip install -e "Sliq-python-lib"

Quick Start

Clean a file

import sliq

# Clean a CSV file and save the result
sliq.clean_from_file(
    api_key="your-api-key",
    dataset_path="path/to/your/data.csv",
    dataset_name="My Dataset",
    save_clean_file_path="path/to/output/",
)

Clean a DataFrame

import sliq
import pandas as pd

# Load your data
df = pd.read_csv("path/to/your/data.csv")

# Clean and get the result as a DataFrame
cleaned_df = sliq.clean_from_dataframe(
    api_key="your-api-key",
    dataframe=df,
    dataset_name="My Dataset",
    is_return_dataframe=True,
)

Features

  • Simple API: Just two functions to clean any dataset
  • Multiple formats: Supports CSV, JSON, JSONL, Excel, and Parquet files
  • DataFrame support: Works with both Pandas and Polars DataFrames
  • AI-powered: Uses advanced AI to understand and clean your data
  • Customizable: Provide context about your data for better cleaning
  • Secure: Your data is processed securely and deleted after cleaning

Supported File Formats

Format Extension
CSV .csv
JSON .json
JSONL .jsonl
Excel .xlsx, .xls
Parquet .parquet

API Reference

clean_from_file()

Clean a dataset from a file path.

sliq.clean_from_file(
    api_key: str,                          # Required: Your Sliq API key
    dataset_path: str,                     # Required: Path to your dataset file
    dataset_name: str,                     # Required: Name for your dataset
    save_clean_file_path: str = "",        # Path to save the cleaned file
    save_clean_file_name: str = "",        # Custom name for the saved file
    dataset_description: str = "",         # Description of your data
    dataset_purpose: str = "",             # What the data will be used for
    column_guide: dict[str, str] = None,   # Column name to description mapping (see below)
    data_source: str = "",                 # Where the data came from
    user_instructions: str = "",           # Special cleaning instructions
    is_feature_engineering: bool = False,  # Enable feature engineering
    is_detailed_report: bool = False,      # Generate detailed report
    verbose: bool = False,                 # Show progress messages
)

clean_from_dataframe()

Clean a Pandas or Polars DataFrame.

cleaned_df = sliq.clean_from_dataframe(
    api_key: str,                          # Required: Your Sliq API key
    dataframe: pd.DataFrame | pl.DataFrame,# Required: Your DataFrame
    dataset_name: str,                     # Required: Name for your dataset
    is_return_dataframe: bool = True,      # Return cleaned DataFrame
    dataset_description: str = "",         # Description of your data
    dataset_purpose: str = "",             # What the data will be used for
    column_guide: dict[str, str] = None,   # Column name to description mapping (see below)
    data_source: str = "",                 # Where the data came from
    user_instructions: str = "",           # Special cleaning instructions
    is_feature_engineering: bool = False,  # Enable feature engineering
    is_detailed_report: bool = False,      # Generate detailed report
    verbose: bool = False,                 # Show progress messages
)

Column Guide Validation

When providing a column_guide, the following rules apply:

  1. All columns required: You must provide descriptions for all columns in your dataset
  2. Column count must match: The number of keys in column_guide must equal the number of columns in your dataset
  3. Names must match: Column names are validated against the dataset (case-insensitive, underscore-insensitive)

Example:

# For a dataset with columns: "first_name", "last_name", "Age"
column_guide = {
    "first_name": "Customer's first name",
    "last_name": "Customer's last name", 
    "age": "Customer's age in years",  # Case-insensitive: "age" matches "Age"
}

If column names don't match, you'll get a helpful error message listing the mismatched columns and the actual dataset columns.


## Getting an API Key

To use Sliq, you need an API key. Visit [sliqdata.com](https://sliqdata.com) to get your API key.

## Documentation

For full documentation, visit [sliqdata.com/docs](https://sliqdata.com/docs).

## License

MIT License - see [LICENSE](LICENSE) for details.

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

sliq-0.1.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

sliq-0.1.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file sliq-0.1.0.tar.gz.

File metadata

  • Download URL: sliq-0.1.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for sliq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 864510935a54b70c16e54952821409bfa55297d8b7f15be6ae2abde8117e88f7
MD5 aca617fa32c131c460b2ec12d6478dfc
BLAKE2b-256 9c95c9ce85938d5a6ec623f0e68bce22bc68bb7e2d56030bb76b10bd1e9fbacf

See more details on using hashes here.

File details

Details for the file sliq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sliq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for sliq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7191932bbc2723232d6897332897c9f3f214c5c112fd4673e52878ccbf7dbda
MD5 f984867581ed8e8c6f86385060570626
BLAKE2b-256 02f3caab59279ad677d360002ea0eeb1e76a3eb3825e9e2c1168c43b02e95748

See more details on using hashes here.

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