What is the difference between math.isnan ,numpy.isnan and pandas.isnull in python 3?
问题 A NaN of type decimal.Decimal causes: math.isnan to return True numpy.isnan to throw a TypeError exception. pandas.isnull to return False What is the difference between math.isnan, numpy.isnan and pandas.isnull? 回答1: The only difference between math.isnan and numpy.isnan is that numpy.isnan can handle lists, arrays, tuples whereas math.isnan can ONLY handle single integers or floats. However , I suggest using math.isnan when you just want to check if a number is nan because numpy takes