Make EAs for all Block subclasses #22388
Labels
ExtensionArray
Extending pandas with custom dtypes or arrays.
Needs Discussion
Requires discussion from core team before further action
A
Block
is basically an Array withmgr_locs
attached. AnIndex
is basically an Array with some fancy indexing and set operations. These should share a bunch of their code.Block.make_block
behaves essentially the same way asIndex._shallow_copy
.blocks.make_block
behaves likeIndex.__new__
. Somevalues
vs_values
vs_ndarray_values
vs_data
juggling may be needed to combine these implementations.For standard dtypes (float, int, uint, ...) these EAs can be thin wrappers around the numpy implementations.
Aside from de-duplicating a bunch of code, this would allow us to standardize on conventions like "
.values
always returns an EA".The only change I envision to EA is that this would entail needing to support 2D arrays (which I'd prefer anyway...).
The text was updated successfully, but these errors were encountered: