pandas.errors.IntCastingNaNError#

exception pandas.errors.IntCastingNaNError[源代码]#

将包含 NaN 的数组转换为整数类型(astype)时引发的异常。

Examples

>>> pd.DataFrame(np.array([[1, np.nan], [2, 3]]), dtype="i8")
Traceback (most recent call last):
IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer