baybe.utils.dataframe.normalize_input_dtypes

baybe.utils.dataframe.normalize_input_dtypes(df: DataFrame, objects: Iterable[_T], /)[source]

Ensure that the input dataframe has the expected dtypes for all columns.

Parameters:
  • df (DataFrame) – The input dataframe to be checked.

  • objects (Iterable[TypeVar(_T, bound= Parameter | Target)]) – The objects for which to check the corresponding column dtypes.

Return type:

DataFrame

Returns:

The original dataframe if there are no dtype issues. Otherwise, a copy with columns converted to expected dtypes.