Forcing NANs to the end is not the right solution.

Consider the median of [NAN, 2, 3, 4, 5]. If you force the NAN to remain 
at the start, the median is 3. If you force the NAN to the end of the 
list, the median is 4. Your choice to force NANs to the end is 
equivalent to introducing a bias towards larger values.

-- 
Steven
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/PUBDGRYYCTHMXLULM2R564JRXPSYMBFY/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to