API / internals: exact semantics of _ndarray_values #23565
Labels
API Design
Internals
Related to non-user accessible pandas implementation
Needs Discussion
Requires discussion from core team before further action
Milestone
We need to better describe the exact semantics of
_ndarray_values
: what is it expected to return and how it is used.Currenlty it is defined on the ExtensionArray, but mentioned it is not part of the "official" interface:
pandas/pandas/core/arrays/base.py
Lines 687 to 697 in 712fa94
One Series/Index, the property will either give you what
EA._ndarray_values
gives, or the underlying ndarray:pandas/pandas/core/base.py
Lines 768 to 780 in 712fa94
What it currently is for the EAs:
_data
, so but losing any information about missing valuesFor what it is currently used (this needs to be better looked at, copying now from #19954 (comment), quoting Tom here):
There are a few other uses (mostly datetime / timedelta / period) that could maybe uses asi8 instead. I'm not familiar enough with indexing to know whether that can operate on something other than ndarrays. In theory, EAs can implement the buffer protocol, which would get the data to cython. But I don't know what ops would be required when we're down there.
The text was updated successfully, but these errors were encountered: