def __getattr__(self, attr):
        # TODO: Pythonize
        "Pass properties and method calls to the DataFrame object"
        instance_method = getattr(self.df, attr)
        if callable(instance_method):
            def fn(*args, **kwargs):
                result = instance_method(*args, **kwargs)   # ()->call the instance method
                if isinstance(result, (pd.DataFrame, pd.Series)):
                    try:
                        name = result.name
                    except AttributeError:
                        name = None
                    return Table(name=name, df=result)  # wrap in Table class
            return fn
        else:
            return instance_method
def __getattr__ ( self , attr ) : instance_method = getattr ( self . df , attr ) if callable ( instance_method ) : def fn ( * args , ** kwargs ) : result = instance_method ( * args , ** kwargs ) if isinstance ( result , ( pd . DataFrame , pd . Series ) ) : try : name = result . name except AttributeError : name = None return Table ( name = name , df = result ) return fn else : return instance_method
Pass properties and method calls to the DataFrame object