data quality rules check
Project description
DQAI (Data Quality Artificial Intelligence)
This code provides a Python class called DQAI that utilizes the OpenAI Chat API to analyze a dataset and generate data quality rules specific to the data.
Usage
- Install the necessary dependencies.
- Set up your OpenAI API key or use the provided default key.
- Prepare your dataset in a suitable format (e.g., CSV).
- Instantiate the
DQAIclass. - Invoke the
invoke_from_datasetmethod, passing the dataset as input. - The code will generate Python code based on the dataset and execute it.
- The generated rules and the results will be saved in the current directory as "generated_code.py" and "rulesapplication.csv," respectively.
- The generated rules can be obtained by calling the
_get_rules_from_filemethod.
Note: Make sure to modify the file path (path variable) in the provided code to match your dataset's location.
Example:
import pandas as pd from dqai import DQAI
Read the dataset from a CSV file
path = "path/to/your/dataset.csv" data = pd.read_csv(path)
Instantiate DQAI and generate data quality rules
dqai = DQAI() result = dqai.invoke_from_dataset(data)
Access the generated rules and results
rules = result["0"] results_df = result["1"]
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
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 ai_dq_module-1.1.0.tar.gz.
File metadata
- Download URL: ai_dq_module-1.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6043b9d3689170213b83ea250b43d4384869fb7ab3e9205d3ec16f3ee14bfa34
|
|
| MD5 |
35fbd80f5edf821af13568ccf7215469
|
|
| BLAKE2b-256 |
39f1df685b1b6b7d9c5d31ef59ed01f1f600f85d1a302d2558f024226077dd9b
|
File details
Details for the file ai_dq_module-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_dq_module-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1491b2a632478ba6fc5e8b91a1b20e1feb55af29e1866c7cb57255b7a0ea7b3
|
|
| MD5 |
5bdfdf92d962f23c50db7befb5f485b8
|
|
| BLAKE2b-256 |
d916afc11c8ef0f9627c38a2919ea6973052d7f67794a295a3b85d65601e29f9
|