prettypandas.formatters module

prettypandas.formatters.as_money(v, precision=2, currency='$', location='prefix')

[DEPRECATED] Convert value to currency.

Parameters:
  • v – numerical value
  • precision – int decimal places to round to
  • currency – string representing currency
  • location – ‘prefix’ or ‘suffix’ representing where the currency symbol falls relative to the value
prettypandas.formatters.as_unit(v, unit, precision=2, location='suffix')

Convert value to unit.

Parameters:
  • v – numerical value
  • unit – string of unit
  • precision – int decimal places to round to
  • location – ‘prefix’ or ‘suffix’ representing where the currency symbol falls relative to the value
prettypandas.formatters.format_number(v, number_format, prefix='', suffix='')

Format a number to a string.