baybe.utils.validation.preprocess_dataframe

baybe.utils.validation.preprocess_dataframe(df: DataFrame, /, parameters: Sequence[Parameter], objective: Objective | None = None, numerical_measurements_must_be_within_tolerance: bool = True)[source]

Preprocess an experimental dataframe by validating and normalizing its contents.

Checks that the dataframe contains all required columns for the given parameters/objective and adjusts their dtypes accordingly.

Parameters:
Return type:

DataFrame

Returns:

The preprocessed dataframe.