I have some clarification here and tried to look around but not able to find out definitively if it is the reason.
stats_df seem to only print if it is the last thing ran. does describe(data.describe()) always have to run last?
i am doing this on jupyter notebook
import pandas as pd
data = pd.read_csv('data.csv')
stats_df = data.describe()
stats_df.loc['range'] = stats_df.loc['max'] - stats_df.loc['min']
//will not print
stats_df
out_fields = ['mean','25%','50%', '75%', 'range']
stats_df = stats_df.loc[out_fields]
stats_df.rename({'50%':'median'}, inplace=True)
//will print
stats_df