def mils(value):
    """Returns number in millions of dollars"""
    try:
        value = float(value) / 1000000
    except (ValueError, TypeError, UnicodeEncodeError):
        return ''
    return '${0:,}M'.format(value)