arviz.
summary
(data, var_names=None, fmt='wide', round_to=2, include_circ=None, stat_funcs=None, extend=True, credible_interval=0.94, order='C')[source]¶Create a data frame with summary statistics.
Parameters: 


Returns: 

Examples
>>> az.summary(trace, ['mu'])
mean sd mc_error hpd_3 hpd_97 ess r_hat
mu[0] 0.10 0.06 0.00 0.02 0.23 487.0 1.00
mu[1] 0.04 0.06 0.00 0.17 0.08 379.0 1.00
Other statistics can be calculated by passing a list of functions.
>>> import pandas as pd
>>> def trace_sd(x):
... return pd.Series(np.std(x, 0), name='sd')
...
>>> def trace_quantiles(x):
... return pd.DataFrame(pd.quantiles(x, [5, 50, 95]))
...
>>> az.summary(trace, ['mu'], stat_funcs=[trace_sd, trace_quantiles])
sd 5 50 95
mu[0] 0.06 0.00 0.10 0.21
mu[1] 0.07 0.16 0.04 0.06