-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
InternalsRelated to non-user accessible pandas implementationRelated to non-user accessible pandas implementationRefactorInternal refactoring of codeInternal refactoring of code
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.
evhubankostis
Metadata
Metadata
Assignees
Labels
InternalsRelated to non-user accessible pandas implementationRelated to non-user accessible pandas implementationRefactorInternal refactoring of codeInternal refactoring of code