I am finding the t confidence interval across rows of my dataframe:
df = pd.DataFrame({'nums_1': [1, 2, 3], 'nums_2': [1, 1, 5], 'nums_3' : [8,7,9]})
df['CI']=df.apply(lambda row: stats.t.interval(0.95, len(df)-1,
loc=np.mean(row), scale=stats.sem(row)), axis=1)
How can I get the confidence intervals given to me by scipy stats t interval to be rounded to two decimal places?