def string_to_float(string):
    """
    Convert a string with a comma (i.e. '3.14') to a float.

    :param str string: string representing a float
    :return numpy.float:
    """
    string_modif = string.replace(u',', u'.').replace(u'\xa0', u'')
    try:
        return float(string_modif)
    except ValueError:
        return float('nan')
