def remove_long_tail(df2, column, count_threshold, value):
    """Returns True if replaced values in column of dataframe
    with specified value
    if the value counts are below threshold."""
    v_counts = df2[column].value_counts()
    long_tail = v_counts[v_counts < count_threshold].index
    df_subset = df2[column].isin(long_tail)
    df2.loc[df_subset, column] = value
    return len(long_tail) > 0