Skip to content

parse

relationalai.semantics.std.numbers
parse(value: str, number: NumberConcept) -> Expression

Parse a string value as a number with the precision and scale of the number argument.

  • value

    (str) - The string value to parse.
  • number

    (NumberConcept) - The NumberConcept specifying the target precision and scale.
  • Expression - An Expression computing the parsed number. Returns Number.

Parse string using another number’s format:

>>> numbers.parse("999.99", Product.price)