fmt_values = [formatter(x) for x in self.values]
return fmt_values
pf.IntArrayFormatter = IntArrayFormatter
yield
pd.options.display.float_format = orig_float_format
pf.IntArrayFormatter = orig_int_format
df = pd.DataFrame(np.random.randint(10000, size=(5, 3)), columns=list('ABC'))
df['D'] = np.random.random(df.shape[0]) * 10000
with custom_formatting():
    pass
Format pandas integers for display