class MyDF(pd.DataFrame):
    _attributes_ = 'myattr1,myattr2'

def __init__(self, *args, **kw):
    super(MyDF, self).__init__(*args, **kw)
if len(args) == 1 and isinstance(args[0], MyDF):
    pass
How to subclass pandas DataFrame?