factor_analyzer.factor_analyzer_utils.impute_values

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

Impute np.nan values with the mean or median, or drop the containing rows.

Parameters

Name Type Description Default
x array - like An 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 or with rows dropped.