[Python-ideas] Suggestion: Extend integers to include iNaN

Nathaniel Smith njs at pobox.com
Sat Sep 29 02:52:22 EDT 2018


On Fri, Sep 28, 2018 at 11:31 PM, Steve Barnes <gadgetsteve at live.co.uk> wrote:
> One specific use case that springs to mind would be for Libraries such
> as Pandas to return iNaN for entries that are not numbers in a column
> that it has been told to treat as integers.

Pandas doesn't use Python objects to store integers, though; it uses
an array of unboxed machine integers.

In places where you can use Python objects to represent numbers, can't
you just use float("nan") instead of iNaN?

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Python-ideas mailing list