def _to_numeric(value):
    """Try to convert a string to an integer or a float.
    If not possible, returns the initial string.
    """
    try:
        value = int(value)
    except:
        try:
            value = float(value)
        except:
            pass
    return value
