1.1.9. src.ml_pipeline.ML_supportΒΆ

Functions

create_unique_Path

finds a unique Path in a Dir

export_df

export_df_to_Path

Given a DF and a Path, export the dataframe to the location with specified instructions based on the file extension

gen_from_template

generates a template file and formats accordingly

generate_sample_df

returns a sample of a dataframe with a given lenght

get_df_from_dict

Given a dictionary, turn it into a pandas DF with KEY and VALUE columns

get_dict_from_df

for a dataframe with keys and values, return a dictionary

import_df

import_df_from_Path

Given a Path, import a dataframe from the location with specified instructions based on the file extension

join_nickname_and_col

Given "EXP", "HOME_AGE", return "EXP-HOME_AGE"

shap_importance

split_ncol

Given EXP-HOME_AGE, return ("EXP", "HOME_AGE")