Closed
Description
What do people think about inheriting pandas classes from abc.collections
classes?
I think the main ones are DataFrame
& Series
inheriting from Mapping
and Index
from Sequence
.
This would enable other libraries to infer classes' behavior in a tighter way, for example to work out whether an object is list-like but not dict-like, they can check the types, rather than hasattr(obj, '__iter__') and not hasattr(obj, 'values')
. And it doesn't cost anything.
But as far as I'm aware, other libraries in the pydata ecosystem don't do this, so this would be out of the norm.