Search code examples
pythonpandasstatisticssummary

Display several summary statistic tables


Does anyone know if it is possible to tell python to display more than one summary statistic tables in the output?

This is my input:

efw2016_mc.describe()
efw1990_mc.describe()
efw1970_mc.describe()

But the output only shows one of the tables. Is it possible to display all three in one output?


Solution

  • Assuming you are using a Jupyter notebook you can use display():

    display(efw2016_mc.describe())
    display(efw1990_mc.describe())
    display(efw1970_mc.describe())
    

    Or use concat() to make one dataframe:

    a = efw2016_mc.describe()
    b = efw1990_mc.describe()
    c = efw1970_mc.describe()
    
    df = pd.concat([a,b,c])
    df