def ic_to_soil_type(df):
    """
    Assign the soil type to the corresponding Ic.

    :param df: (DataFrame) Original DataFrame.
    :return: (DataFrame) Updated DataFrame.
    """
    df = df.assign(soil_type='')
    ic_mask = df['type_index'].values > 3.22
    df.loc[ic_mask, 'soil_type'] = 'Peat'
    ic_mask = df['type_index'].values <= 3.22
    df.loc[ic_mask, 'soil_type'] = 'Clays'
    ic_mask = df['type_index'].values <= 2.76
    df.loc[ic_mask, 'soil_type'] = 'Clayey silt to silty clay'
    ic_mask = df['type_index'].values <= 2.4
    df.loc[ic_mask, 'soil_type'] = 'Silty sand to sandy silt'
    ic_mask = df['type_index'].values <= 1.8
    df.loc[ic_mask, 'soil_type'] = 'Sands: clean sand to silty'
    ic_mask = df['type_index'].values <= 1.25
    df.loc[ic_mask, 'soil_type'] = 'Gravelly sands'
    return df
