def get_type_dict(df):
    """
        Return a dtype dictionary 
        Parameters
        ----------
        df: data frame

        Returns
        -------
        {dtype: [list of variable names]}
    """
    
    uniquetypes = set(df.dtypes)
    typeDict = {}
    for dt in uniquetypes:
        typeDict[str(dt)] = [c for c in df.columns if df[c].dtype == dt]
    return (typeDict)