We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d06ac8 commit b5bd33bCopy full SHA for b5bd33b
pandas/core/dtypes/astype.py
@@ -144,7 +144,9 @@ def _astype_float_to_int_nansafe(
144
"""
145
if not np.isfinite(values).all():
146
raise IntCastingNaNError(
147
- "Cannot convert non-finite values (NA or inf) to integer"
+ """Cannot convert non-finite values (NA or inf) to integer.
148
+ Replace or remove non-finite values or cast to an integer type
149
+ that supports these values (e.g. 'Int64')"""
150
)
151
if dtype.kind == "u":
152
# GH#45151
0 commit comments