def human_readable(number: str) -> str:
    """
    convert a number to a human-readable format, e.g. 1500000 -> 1_500_000
    """
    if number.isdigit() and str(int(number)) == number:    # if number (as a string) contains an int
        return "{:_}".format(int(number))
    # else:
    return "{:_}".format(float(number))