format_df function

Format a data.frame with a specified number of decimal places