-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: integer Extension Array #20700
Comments
here is a fully-function (extension-wise) integer na: https://github.com/jreback/pandas/tree/intna I have enabled inference to accept the new types with a Registry, e.g.
so construction is pretty flexible now. next up is ops |
Cool! Is your intention to do a PR to add this to pandas, or to have it as a separate package for now? |
still needs quite a bit more tests / work. (have arithmetic ops done, but need comparison, and more indexing tests) But i think directly in pandas. Note that this does not actually switch the base inference (e.g. [1,2 ,3]) still resolves to int64, we can do that at a later point). I suspect will have to change quite a lot of tests as we assume float conversions in a myriad of ways. |
* ENH: add integer-na support via an ExtensionArray closes pandas-dev#20700 closes pandas-dev#20747
xref #8640
Could easily imagine an
ExtensionArray
which uses as an implementation a numpy array of the appropriate dtype and a bitmask in order to fully support Integer NA across the board. I don't think this would be too hard. As a bonus, would be zero-copy compat with pyarrow impl (for the future)Boolean(API: boolean Extension Array #21778)making these the actual default (e.g. when integers are inferred with or w/o nulls) might be non-trivial, but let's implement first. These would give rise to a hierarchy of dtypes, e.g.
IntegerDtype
,Int8Dtype
The text was updated successfully, but these errors were encountered: