diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 6c1feded35b5b..c7fc71104442c 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -1610,6 +1610,9 @@ def maybe_cast_to_integer_array(arr: list | np.ndarray, dtype: np.dtype) -> np.n with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=RuntimeWarning) + warnings.filterwarnings( + "ignore", "elementwise comparison failed", FutureWarning + ) if np.array_equal(arr, casted): return casted