def formatNumber(number, billions="B", spacer=" ", isMoney = False):
        """
        Format the number to a string with max 3 sig figs, and appropriate unit multipliers

        Args:
            number (float or int):  The number to format.
            billions (str): Default "G". The unit multiplier to use for billions. "B" is also common.
            spacer (str): Default " ". A spacer to insert between the number and the unit multiplier. Empty string also common.
            isMoney (bool): If True, a number less than 0.005 will always be 0.00, and a number will never be formatted with just one decimal place.
        """
        if number == 0:
            return "0%s" % spacer

        absVal = float(abs(number))
        flt = float(number)
        if absVal >= 1e12: # >= 1 trillion
            return "%.2e" % flt
        if absVal >= 10e9: # > 10 billion
            return "%.1f%s%s" % (flt/1e9, spacer, billions)
        if absVal >= 1e9: # > 1 billion
            return "%.2f%s%s" % (flt/1e9, spacer, billions)
        if absVal >= 100e6: # > 100 million
            return "%i%sM" % (int(round(flt/1e6)), spacer)
        if absVal >= 10e6: # > 10 million
            return "%.1f%sM" % (flt/1e6, spacer)
        if absVal >= 1e6: # > 1 million
            return "%.2f%sM" % (flt/1e6, spacer)
        if absVal >= 100e3: # > 100 thousand
            return "%i%sk" % (int(round(flt/1e3)), spacer)
        if absVal >= 10e3: # > 10 thousand
            return "%.1f%sk" %  (flt/1e3, spacer)
        if absVal >= 1e3: # > 1 thousand
            return "%.2f%sk" % (flt/1e3, spacer)
        if isinstance(number, int):
            return "%i" % number
        if absVal >= 100:
            return "%i%s" % (flt, spacer)
        if absVal >= 10:
            if isMoney:
                return "%.2f%s" % (flt, spacer) # Extra degree of precision here because otherwise money looks funny.
            return "%.1f%s" % (flt, spacer) # Extra degree of precision here because otherwise money looks funny.
        # if absVal > 1:
        #   return "%.2f%s" % (absVal, spacer)
        if absVal > 0.01:
            return "%.2f%s" % (flt, spacer)
        if isMoney:
            return "0.00%s" % spacer
        return ("%.2e%s" % (flt, spacer)).replace("e-0", "e-")