load_data

mastml.data_loader.load_data(file_path, input_features=None, input_target=None, input_grouping=None, feature_blacklist=[])[source]

Method that accepts the filepath of an input data file and returns a full dataframe and parsed X and y dataframes

Args:

file_path: (str), path to data file

input_features: (str), column names to be used as input features (X data). If ‘Auto’, then takes all columns that are not listed in target_feature or feature_blacklist fields.

target_feature: (str), column name for data to be fit to (y data).

grouping_feature: (str), column names used to group data in user-defined grouping scheme

Returns:

df: (dataframe), full dataframe of the input X data (y data is removed)

X: (dataframe), dataframe containing only the X data from the data file

X_noinput: (dataframe), dataframe containing the columns of the original X data that are not used as input features

X_grouped: (dataframe), dataframe containing the columns of hte original X data that correspond to a data grouping scheme

y: (dataframe), dataframe containing only the y data from the data file