def series_frequency(series, value, percent=True):
    """
    Calculates the frequency of a value in a list.
    :param pd.Series series: the pandas.Series.
    :param value: the value to calculate the frequency
    :return: The frequency of a value in a list
    """
    number_of_value = series.values.tolist().count(value)
    frequency_ = number_of_value / len(series)
    if percent:
        frequency_ *= 100
    return frequency_
