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>