Preserve subclass family on reshape operations #15563
Labels
API Design
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Subclassing
Subclassing pandas objects
Milestone
Subclassed Series and DataFrames with custom
_constructor
,_constructor_sliced
, and_constructor_expanddim
methods return pandas Series and DataFrame objects on reshape operations:Slicing operations use
_constructor_sliced
:Reshape operations return regular pandas objects:
It would be great if this returned a
SublcassedSeries
. Same goes for unstack and pivot.The text was updated successfully, but these errors were encountered: