diff --git a/pandera/engines/pandas_engine.py b/pandera/engines/pandas_engine.py index 4d3d63f5c..c72b058b7 100644 --- a/pandera/engines/pandas_engine.py +++ b/pandera/engines/pandas_engine.py @@ -718,7 +718,7 @@ def check( ) else: is_python_string = data_container.map(lambda x: isinstance(x, str)) # type: ignore[operator] - return is_python_string | data_container.isna() + return is_python_string.astype(bool) | data_container.isna() Engine.register_dtype(