def my_summary2(data, var_names_in, var_names_out, var_functions,
    var_name_weight=None, var_names_group=None):
    result = pd.DataFrame()
Creating a partial SAS PROC SUMMARY replacement in Python/Pandas