Skip to main content

A small python package to clean dirty data

Project description

data_laundry

Your one stop solution for cleaning dirty data in pandas dataframes.

Features

  1. Automatic column renaming to snake_case
  2. Read from csv, xlsx and parquet files into pandas dataframe
  3. Selecting subset of columns from the function call itself
  4. Uses dtype_backend='pyarrow'
  5. Convert dataframe to SQL Server compatible code. This is useful if you don't have LOAD FILE privileges on the database

Usage

import data_laundry as dl

df = dl.launder("/path/to/file", select_columns="columns to select", **default_pandas_kwargs)
df = dl.launder(df, select_columns="columns to select", **default_pandas_kwargs)

dl.convert_to_sql(
    df,
    table_name="name of sql table",
    output_path="file path where sql code will be written",
    step=1000
)

Installation

pip install data_laundry

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

data_laundry-0.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

data_laundry-0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file data_laundry-0.1.tar.gz.

File metadata

  • Download URL: data_laundry-0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for data_laundry-0.1.tar.gz
Algorithm Hash digest
SHA256 c8ca8a8f2ca4e8e81d8e5da973ef85a016e156d714c154f838c693b5d881b0b3
MD5 6609c33c6ecc02b32db82db0792695ea
BLAKE2b-256 39f164277e56b6aff0dc7f2d918150cea57c9b2bc3444953938c549e845d3c33

See more details on using hashes here.

File details

Details for the file data_laundry-0.1-py3-none-any.whl.

File metadata

  • Download URL: data_laundry-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for data_laundry-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4169ee19892b33cddc41cf3ae6b2d12824ddbfc0df8e98897d301bbee3c7851e
MD5 9a157150e7d252c0ce2ec09e1a638820
BLAKE2b-256 da708a70bbd06ed6dd6f93ff28dab0d8c27a14b0f2d78621ecf47fd276977631

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