Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pandas/core/dtypes/astype.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ def _astype_float_to_int_nansafe(
"""
if not np.isfinite(values).all():
raise IntCastingNaNError(
"Cannot convert non-finite values (NA or inf) to integer"
"Cannot convert non-finite values (NA or inf) to integer."
"Replace or remove non-finite values or cast to an integer type"
"that supports these values (e.g. 'Int64')"
)
if dtype.kind == "u":
# GH#45151
Expand Down
Loading