python round column to 2 decimal places code example
Example 1: pandas dataframe print decimal places
pd.set_option('precision', 4)
print(df.to_latex(index=False))
Example 2: pandas groupby mean round
data.mean().round(0) # Rounds mean to nearest integer, e.g. 1.95 = 2 and 1.05 = 1