Skip to main content

Polars minimal data profiler.

Project description

Data Quality Profiler

Overview

The pldmp package provides an efficient and scalable way to perform data profiling using the Polars library. It analyzes datasets to generate various statistical summaries and insights, helping users understand the structure and quality of their data.

Features

  • Supports a variety of data types, including numeric, string, and datetime.
  • Computes key statistical metrics such as mean, median, standard deviation, and percentiles.
  • Detects missing values, empty fields, and string token distributions.
  • Provides both a Python and a command-line interface (CLI) for easy usage.

Installation

pip install plmdp

Usage

Python Example

from pathlib import Path
from pprint import pprint
import polars as pl
from plmdp import Profiler

if __name__ == "__main__":
    datafile_path = Path(__file__).resolve().parent / "data.csv"
    data: pl.DataFrame = pl.read_csv(datafile_path, separator=";")
    results = Profiler().run_profiling(data)
    pprint(results)

CLI Example

#!/bin/bash

DATA_PATH="$(pwd)/data.csv"
SCHEMA='{"comment": "String", "dob": "Date", "sales": "Float32"}'
LOADER_KWARGS='{"separator":";"}'
FORMATTER='json'

plmdp --path "$DATA_PATH" --schema="$SCHEMA" --kwargs="$LOADER_KWARGS" --format="$FORMATTER"

Supported Data Types

The package supports the following Polars data types:

  • Numeric: Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, Decimal
  • String: String, Categorical
  • Date/Time: Date, Datetime
  • Others: Boolean

Metrics Computed

  • String Profile: Minimum/maximum/average string length, token counts, empty or whitespace count.
  • Numeric Profile: Mean, median, standard deviation, min/max values, and percentiles.
  • Date/Datetime Profile: Minimum and maximum values.
  • Base Profile: Null values count.

License

MIT License

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

plmdp-0.1.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

plmdp-0.1.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file plmdp-0.1.1.tar.gz.

File metadata

  • Download URL: plmdp-0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for plmdp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 74397407564129c79f20424bebd896f73582168ae57d48fec9abff48bfcabc07
MD5 e879d7daaacc84839f0deaf121377173
BLAKE2b-256 45f16274393af115af9f2e964eaf715dc249d44930acd1dd1b8ba47a7e5c6918

See more details on using hashes here.

File details

Details for the file plmdp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: plmdp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for plmdp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c03f65e20a63fd361ea2132460c830c29a5d6a0b185fb9b23430e2bc7f6eb3e
MD5 9d700342998116c1da8ec77386daed05
BLAKE2b-256 fbda0c44b412cfa7e49491ef5cda9560c4ac360260da4d40054465f4029f8bef

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