A small python package to clean dirty data
Project description
data_laundry
Your one stop solution for cleaning dirty data in pandas dataframes.
Features
- Automatic column renaming to snake_case
- Read from csv, xlsx and parquet files into pandas dataframe
- Selecting subset of columns from the function call itself
- Uses
dtype_backend='pyarrow' - Convert dataframe to SQL Server compatible code. This is useful if you don't have
LOAD FILEprivileges 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
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8ca8a8f2ca4e8e81d8e5da973ef85a016e156d714c154f838c693b5d881b0b3
|
|
| MD5 |
6609c33c6ecc02b32db82db0792695ea
|
|
| BLAKE2b-256 |
39f164277e56b6aff0dc7f2d918150cea57c9b2bc3444953938c549e845d3c33
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4169ee19892b33cddc41cf3ae6b2d12824ddbfc0df8e98897d301bbee3c7851e
|
|
| MD5 |
9a157150e7d252c0ce2ec09e1a638820
|
|
| BLAKE2b-256 |
da708a70bbd06ed6dd6f93ff28dab0d8c27a14b0f2d78621ecf47fd276977631
|