def get_columns_by_type(df, req_type):
    """
    get all columns of dataframe with provided dtypes

    Parameters:
    df : Pandas dataframe
    req_type: dtype

    Returns:
    list: list of columns
    """

    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)