diff --git a/pandas/core/dtypes/cast.py b/pandas/core/dtypes/cast.py index 08adb580ff08f..9ce769f52ccd5 100644 --- a/pandas/core/dtypes/cast.py +++ b/pandas/core/dtypes/cast.py @@ -1697,6 +1697,8 @@ def maybe_cast_to_integer_array(arr: list | np.ndarray, dtype: np.dtype) -> np.n ) raise ValueError("Trying to coerce float values to integers") if arr.dtype == object: + if (casted.astype(str) == arr).all(): + return casted raise ValueError("Trying to coerce object values to integers") if casted.dtype < arr.dtype: