Please verify, if df['value'] contains strings or other data types that cannot be converted to float, attempting conversion within the UDF will likely cause an error.