baybe.utils.dataframeΒΆ

Dataframe utilities.

Functions

add_fake_measurements(data, targets[, ...])

Add fake measurements to a dataframe which was the result of a recommendation.

add_noise_to_perturb_degenerate_rows(df[, ...])

Add noise to degenerate rows to make them numerically distinguishable.

add_parameter_noise(data, parameters[, ...])

Apply uniform noise to the parameter values of a recommendation frame.

arrays_to_dataframes(input_labels, ...[, ...])

Make a decorator for labeling the input/output columns of array-based callables.

df_drop_single_value_columns(df[, lst_exclude])

Drop dataframe columns with zero variance.

df_drop_string_columns(df[, ignore_list])

Drop dataframe columns with string values.

df_uncorrelated_features(df[, exclude_list, ...])

Return an uncorrelated set of features.

filter_df(df, /, to_keep[, complement])

Filter a dataframe based on a second dataframe defining filtering conditions.

fuzzy_row_match(left_df, right_df, ...)

Match row of the right dataframe to the rows of the left dataframe.

get_transform_objects(df, objects, /, *[, ...])

Extract the objects relevant for transforming a given dataframe.

pretty_print_df(df[, max_rows, max_columns, ...])

Convert a dataframe into a pretty/readable format.

to_tensor(*x)

Convert numpy arrays and pandas dataframes to tensors.