Data.format

Data.format(key, **kargs)[source]

Return the contents of key pretty formatted using format_error().

Parameters
  • fmt (str) – Specify the output format, opyions are:

    • “text” - plain text output

    • “latex” - latex output

    • “html” - html entities

  • escape (bool) – Specifies whether to escape the prefix and units for unprintable characters in non text formats )default False)

  • mode (string) – If “float” (default) the number is formatted as is, if “eng” the value and error is converted to the next samllest power of 1000 and the appropriate SI index appended. If mode is “sci” then a scientifc, i.e. mantissa and exponent format is used.

  • units (string) – A suffix providing the units of the value. If si mode is used, then appropriate si prefixes are prepended to the units string. In LaTeX mode, the units string is embedded in mathrm

  • prefix (string) – A prefix string that should be included before the value and error string. in LaTeX mode this is inside the math-mode markers, but not embedded in mathrm.

Returns

A pretty string representation.

The if key=”key”, then the value is self[“key”], the error is self[“key err”], the default prefix is self[“key label”]+”=” or “key=”, the units are self[“key units”] or “”.