invert4geom.kfold_df_to_lists#
- kfold_df_to_lists(df)[source]#
convert a single dataframe with fold columns in the form fold_0, fold_1 etc. into a list of testing dataframes for each fold and a list of training dataframes for each fold.
- Parameters:
df (
DataFrame) â dataframe with fold columns in the form fold_0, fold_1 etc., as output by function split_test_train().- Return type:
- Returns:
test_dfs (list[pandas.DataFrame]) â a list of testing dataframes for each fold
train_dfs (list[pandas.DataFrame]) â a list of training dataframes for each fold