Formats (datascience.formats)¶
String formatting for table entries.
-
class
datascience.formats.Formatter(min_width=None, max_width=None, etc=None)[source]¶ String formatter that truncates long values.
-
converts_values¶ Whether this Formatter also converts values.
-
etc= ' ...'¶
-
max_width= 60¶
-
min_width= 4¶
-
-
class
datascience.formats.NumberFormatter(decimals=2, decimal_point='.', separator=', ')[source]¶ Format numbers that may have delimiters.
-
converts_values= True¶
-
-
class
datascience.formats.CurrencyFormatter(symbol='$', *args, **vargs)[source]¶ Format currency and convert to float.
-
convert(value)[source]¶ Convert value to float. If value is a string, ensure that the first character is the same as symbol ie. the value is in the currency this formatter is representing.
-
converts_values= True¶
-