Skip to content

string

relationalai.semantics.std.strings
string(
s: (
StringValue
| IntegerValue
| FloatValue
| NumberValue
| DateTimeValue
| DateValue
),
) -> Expression

Convert a value to a string representation.

  • Expression - An Expression representing the String conversion of the input. Returns String.

Convert various types to strings:

>>> strings.string(123)
>>> strings.string(3.14)
>>> strings.string(date(2024, 1, 15))
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
        └──  Work with strings
            └──  Convert values to strings