REGR: DataFrame.from_records for subclasses no longer calls subclass constructor #57008
Labels
Regression
Functionality that used to work in a prior pandas version
Subclassing
Subclassing pandas objects
Milestone
Example
With pandas 2.1.4, this works fine.
The reason for this is because
from_records
was updated (#52419) to usepandas/pandas/core/frame.py
Line 2532 in 5740667
instead of
cls(mgr)
for the final dataframe construction.I think this should probably at least use
_constructor_from_mgr
instead of_from_mgr
(and maybe even still call the class? because in this case there is not finalize that can be called to finalize the initialization)The text was updated successfully, but these errors were encountered: