factor_analyzer.factor_analyzer_utils.apply_impute_nan

factor_analyzer.factor_analyzer_utils.apply_impute_nan(x, how='mean')

Apply a function to impute np.nan values with the mean or the median.

Parameters

Name Type Description Default
x array - like The 1-D array to impute. required
how str Whether to impute the ‘mean’ or ‘median’. Defaults to ‘mean’. 'mean'

Returns

Name Type Description
x numpy.ndarray The array, with the missing values imputed.