def get_columns_by_type(df, req_type):
    """
    get columns by type of data frame

    Parameters:
    df : data frame
    req_type : type of column like categorical, integer,

    Returns:
    df: Pandas data frame
    """
    g = df.columns.to_series().groupby(df.dtypes).groups
    type_dict = {k.name: v for k, v in g.items()}
    return type_dict.get(req_type)