>>> nan=float('NaN') >>> x=[('GroundBasedMechWT', nan), ('GroundBasedCTL', nan), ('GroundBasedManualWT', nan), ('GroundBasedManualLog', nan), ('CableManualWTLog', 60.77), ('CableManualWT', 58.52), ('CableManualLog', 68.17), ('CableManualCTL', nan), ('HelicopterManualWT', 96.82), ('HelicopterManualCTL', nan)] >>> nan<1 False >>> nan<1.0 False >>> min(x) ('CableManualCTL', nan)
I do not think nan is considered smaller than regular floats. Probably min compares strings in alphabetical order.
(Not a complete answer, but may help)
source share