Open
Description
Speculative: in _add_margins
there is a snippet
if isinstance(dtype, ExtensionDtype):
# Can hold NA already
continue
This seems to assume that the dtype will have dtype._can_hold_na
, but that is not actually required of ExtensionDtypes. The task here is to implement a test case that gets here with an ExtensionDtype that cannot hold na, make sure it doesn't break things.