format number in dataframe code example Example: pandas dataframe print decimal places pd.set_option('precision', 4) print(df.to_latex(index=False))