import numpy as np import pandas as pd some_numbers = np.random.ranf(5) df = pd.DataFrame({'random_numbers':some_numbers}) rounded_df = df.round(decimals=2)