decimalCastTo

fnSeries decimalCastTo(Series s, DataType target, bool strict)

Casts a flat Series into a DECIMAL column at the target's precision/scale: STRING parses exactly (inexact or malformed is a failure); the integer kinds multiply up with the overflow check; FLOAT32/64 convert through the shortest round-trip decimal text (the explicit lossy step - 0.1 lands exact, binary dust does not). Everything else rejects.

Parameters

sthe source Series (STRING, integer or float kind)
targetthe DECIMAL target dtype (precision/scale from its meta)
strictthrow on failures (true) or map them to null

Returns

the DECIMAL Series.

Throws

DataFrameException on unsupported sources always, and per

the table when strict.