@staticmethod
    def sizeof_fmt(num, suffix='b'):
        fmt = "%3.1f %s%s"
        for unit in ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']:
            if abs(num) < 1024.0:
                return fmt % (num, unit, suffix)
            num /= 1024.0
        return fmt % (num, 'Y', suffix)
dataset/ETHPy150Open pydata/pandas/pandas/io/gbq.py/GbqConnector.sizeof_fmt/original