FORMAT A CSV STRING OF NUMBERS

Formats a comma-separated list of numeric values into strings using a printf-style format specifier. Use this worker when you need to control the display precision or width of numbers before passing them downstream as formatted text.

When to use

Classification: process.

Tagged: csv, number_formatting, printf, scalar, sprintf, string_format.

Inputs

Label ID Type Default Required Description
Value To Be Formatted values scalar Scalar numeric value (or comma-separated list of values) to be formatted; required at runtime even though marked optional in the schema.
Format format string %10.4f   Printf-style format specifier string (e.g. ‘%10.4f’) controlling field width and decimal precision; defaults to ‘%10.4f’, which produces a 10-character-wide value with 4 decimal places.

Outputs

Label ID Type Description
string_sprintf_output_1 string_sprintf_output_1 scalar Whitespace-trimmed, formatted string representation of the input value(s) produced by applying the printf format specifier to each element.

Disciplines

  • data.curve.transform
  • data.io.csv

Runnable example

A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=string_format_csv


Auto-generated from transformation schema. Worker id: string_format_csv. Schema hash: be37b9bf9c07. Hand-curated docs in workerexamples/ override this page when present.