Library for Handling Missing Data
PROJECT 3, UCS633 - Data Analysis and Visualization
Navkiran Singh
COE17
Roll number: 101703365
Takes two inputs - filename of input csv, intended filename of output csv.
Two optional arguments - which must be provided together or left out.
Resulting csv is saved with the name you provide.
Installation
pip install missing_data_navkiran
Recommended - test in a virtual environment.
Use via command line
Defaults are drop NaN with parameter along = 0 (drops rows containing NaN)
missing_data_navkiran_cli in.csv out.csv
Drop rows with NaN
missing_data_navkiran_cli in.csv out.csv DROP 0
Drop columns with NaN
missing_data_navkiran_cli in.csv out.csv DROP 1
Forward filling
missing_data_navkiran_cli in.csv out.csv FILL 0
Backward filling
missing_data_navkiran_cli in.csv out.csv FILL 1
Imputing with mean
missing_data_navkiran_cli in.csv out.csv IMPUTE 0
Imputing with median
missing_data_navkiran_cli in.csv out.csv IMPUTE 1
Imputing with mode
missing_data_navkiran_cli in.csv out.csv IMPUTE 2
First argument after outcli is the input csv filename from which the dataset is extracted. The second argument is for storing the final dataset after processing.
Use in .py script
from missing_data_navkiran import dropval,filler,impute
input_df = pd.read_csv('in.csv')
output_df = dropval(input_df,along=0)
# Or
output_df = filler(input_df,1)
# Or
output_df = impute(input_df,1)
There are also stand alone functions to fill numerical data and fill categorical data.
from missing_data_navkiran import fill_numerical,fill_categorical
fill_numerical(input_df,list_of_numerical_columns)
fill_categorical(input_df,list_of_categorical_columns)
Metadata
Release files for missing-data-navkiran 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| missing_data_navkiran-1.0.0.tar.gz | 3.0 kB | Without provenance | Details for missing_data_navkiran-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| missing_data_navkiran-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for missing_data_navkiran-1.0.0-py3-none-any.whl |
Total release size: 7.5 kB
Security for missing-data-navkiran 1.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.