The error message “IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer” arises when attempting to cast non-finite values, such as NaN (Not a Number) or infinity (inf), to an integer data type. Here the breakdown of the error: Here the script to generate the error: Above script will result in “IntCastingNaNError” because can’tContinue reading “IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer”