Skip to content

Imputer function to impute missing value either (mean, median, min or max) #6

Description

@BastinRobin

Impute:

Takes a complete pandas dataframe and now use machine learning sklearn.preprocessing import Imputer to impute missing values of each columns and return clean dataframe

Method Structure:

.. code-block:: python

def impute(data, strategy='mean'):
	
    ''' Your code goes here '''
    
    return data

Parameters:

data : pandas dataframe
        - Enter the dataframe directly

   
strategy: str (default='mean')
        - It can be mean, median, min or max

Usage:

.. code-block:: python

    >> p = process()
    >> p.imputer(pd.DataFrame(), 'mean')
    >> <pandas.dataframe>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions