The as_percent() format always display the value without decimals and the precision parameter has no effect at all. I checked the code and realized that:
1/ there are 2 as_percent() in formatters (only 'partial' object is used)
2/ the method as_percent() in class PrettyPandas does not use the precision parameter at all, so I changed the call to partial below the comment: '# TODO: Find good way to implement precision' as:
# TODO: Find good way to implement precision
precision = self.precision if precision is None else precision
add_formatter = partial(self._format_cells,
as_percent,
subset=subset,
format='0.{}%'.format('0' * precision))
maybe there is a better implementation but at least the precision is taken into account now.
The as_percent() format always display the value without decimals and the precision parameter has no effect at all. I checked the code and realized that: 1/ there are 2 as_percent() in formatters (only 'partial' object is used) 2/ the method as_percent() in class PrettyPandas does not use the precision parameter at all, so I changed the call to partial below the comment: '# TODO: Find good way to implement precision' as:
maybe there is a better implementation but at least the precision is taken into account now.