column_importance_sorter_df#

column_importance_sorter_df(df: DataFrame, ds: Dataset, feature_importances: Series, n_top: int = 10, col: Optional[Hashable] = None) DataFrame[source]#

Return the dataframe of columns sorted and limited by feature importance.

Parameters
dfpd.DataFrame

DataFrame to sort

dstabular.Dataset

dataset used to fit the model

feature_importancespd.Series

feature importance normalized to 0-1 indexed by feature names

n_topint , default: 10

amount of columns to show ordered by feature importance (date, index, label are first)

colt.Optional[Hashable] , default: None

name of column to sort the dataframe

Returns
pd.DataFrame

the dataframe sorted and limited by feature importance.