class MyFormatter(Formatter):

    def format_field(self, value, format_spec):
        if format_spec == 't':
            return str(int(value))
return super(MyFormatter, self).format_field(value, format_spec)
format() float as int