colsgroupby: unique names ~index
    cols2aggf: rest of the cols `unique_dropna_str` for categories

def drop_duplicates_agg(df,colsgroupby,cols2aggf,test=False):
    """
    colsgroupby: unique names ~index
    cols2aggf: rest of the cols `unique_dropna_str` for categories
    """
    if test:
        print(df.shape)
        print(df.drop_duplicates(subset=colsgroupby).shape)
    #ddup aggregated
    dfdupagg=df.loc[(df.duplicated(subset=colsgroupby,keep=False)),:].groupby(colsgroupby).agg(cols2aggf)
    #drop duplicates all
    df_=df.drop_duplicates(subset=colsgroupby,keep=False)
    if test:
        print(df_.shape)
    #append ddup aggregated
    dfout=df_.append(dfdupagg,sort=True)
    if test:
        print(dfout.shape)
    return dfout