def stringtodigit(string: str):
    """
    attempts to convert a unicode string to float or integer

    :param str string: String to attempt conversion on
    :return:
    """
    try:
        value = float(string)  # try converting to float
    except ValueError:
        try:
            value = int(string)  # try converting to int
        except ValueError:
            value = string  # otherwise keep as unicode
    return value