MLData, is a project to clean and normalize data for machine learning process.
## How to install
```pip install mldata```
## Usage Example
Usage Example:
```
from mldata import Processor
new_file_path = "outputs/new.csv"
processor = Processor("resource/raw_dataset.csv", target_column="APPROVE/NOT", exclude_column_list=["id"],
category_list=["Work Class", "FnlWgt", "Education", "Maried Status", "Occupation",
"Relationship", "Race", "Gender", "Native Country", "Flag"],
invalid_values=["?", "", "null", None],
positive_tag=1)
processor.normalize()
processor.save_to_file(new_file_path)
```
## API Description
1, Init function
```
Processor(csv_file_path, target_column, exclude_column_list=None, category_list=None, positive_tag=1,
csv_header=0, invalid_values=None)
```
Parameters:
csv_file_path: The origin csv file path
target_column: The column name of the target
exclude_column_list: Columns no need to normalize
category_list: A column name list which are category based columns
positive_tag: The positive tag for the target column value, default value is 1
invalid_values: values in csv not valid, such as "?", "", "null", None
2, Norm the list
```buildoutcfg
Processor.normalize()
```
This function is used to do norm to the csv file.
3, Save result to csv file.
```buildoutcfg
Processor.save_to_file(new_file_name)
```
This function is used to save normalized output to csv file.
Parameters:
new_file_name: The new file name to save the normalized data
Metadata
Release files for MLData 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| MLData-2.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Release files / MLData-2.0.0-py2.py3-none-any.whl
| Download URL | MLData-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d905200efc46be2e8d44f99156cb3eb230a10f3e56025a5996d3fa7b75201fd6
|
|
BLAKE2b-256 checksum How to use checksums |
b01f40cd24cedcd3deb8f225569a889a3c2a84cca13d29264b336734e868ae9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for MLData 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.