def numeric_impute(data, num_cols, method):
    """
    Performs numerical data imputaion based 
    on the given method
    
    Inputs:
            data - (DataFrame) dataset with missing 
                     numeric values 
            num_cols - (set) numeric column names
            method - (str) imputation type that takes 
                              one of the following values
                              {'mean', 'median', 'mode'}
            
    Outputs: 
            output - (DataFrame) dataset with imputed missing values 
            
    """
    num_data = data[list(num_cols)]
    if method == 'mode':
        output = num_data.fillna(getattr(num_data, method)().iloc[0])
    else:
        output = num_data.fillna(getattr(num_data, method)())
    return output