Raise this error instead of NotImplementedError for abstract methods.
Examples
>>> class Foo:
... @classmethod
... def classmethod(cls):
... raise pd.errors.AbstractMethodError(cls, methodtype="classmethod")
... def method(self):
... raise pd.errors.AbstractMethodError(self)
>>> test = Foo.classmethod()
Traceback (most recent call last):
AbstractMethodError: This classmethod must be defined in the concrete class Foo
>>> test2 = Foo().method()
Traceback (most recent call last):
AbstractMethodError: This classmethod must be defined in the concrete class Foo
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.errors.AbstractMethodError.html