change the argument object to df in the generic function for consistency.