def groupby_aggs(df,aggs,col = "object_id"):
    """
    Given a Dataframe and a dict of {"field":"["agg", "agg"]"}, perform the 
    given aggregations using the given column as the groupby key. The original
    (non-aggregated) field is dropped from the dataframe. 
    """

    res = None
    for i,j in aggs.items():
        for k in j:
            tmp = df.groupby(col,as_index=False).agg({i:[k]})
            tmp.columns = [col,'%s_%s'%(k,i)]
            res = tmp if res is None else  res.merge(tmp,on=[col],how='left')
        df.drop_column(i)
    return res