← trunc operator page · numeric/trunc/sc_digits/drops_after_fourth_decimal
pandas ✅ · DuckDB ✅
trunc of a scalar with numDigit given: trunc(SC_1, SC_2) with SC_1 = 3.14159 and SC_2 = 4.
Truncation: "trunc ( 3.14159, 4 ) gives 3.1415".
SC_r = 3.1415, a Number: the fourth decimal is kept and the rest dropped.
SC_r := trunc(SC_1, SC_2);
| SC_1 | SC_2 |
|---|---|
| 3.14159 | 4 |
{
"scalars": [
{"name": "SC_1", "type": "Number"},
{"name": "SC_2", "type": "Integer"}
]
}
{
"scalars": [
{
"name": "SC_r",
"type": "Number",
"value": "3.141500"
}
]
}