validate_columns_exist#

validate_columns_exist(df: DataFrame, columns: Union[Hashable, List[Hashable]], raise_error: bool = True) bool[source]#

Validate given columns exist in dataframe.

Parameters
dfpd.DataFrame

dataframe to inspect

columnst.Union[Hashable, t.List[Hashable]]

Column names to check

raise_errorbool, default: True

whether to raise an error if some column is not present in the dataframe or not

Raises
DeepchecksValueError

If some of the columns do not exist within provided dataframe. If receives empty list of ‘columns’. If not all elements within ‘columns’ list are hashable.