def _int(value):
    """
    Converts integer string values to integer

    >>>  _int('500K')
    >>>  500000

    :param value: string
    :return: integer
    """

    value = value.replace(",", "")
    num_map = {"K": 1000, "M": 1000000, "B": 1000000000}
    if value.isdigit():
        value = int(value)
    else:
        if len(value) > 1:
            value = value.strip()
            value = float(value[:-1]) * num_map.get(value[-1].upper(), 1)
    return int(value)