decimalCastFrom

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

Casts a DECIMAL Series to its admitted targets: STRING renders exactly; the integer kinds keep exact values only (a nonzero fraction or an out-of-range quotient is a failure); FLOAT32/64 compute coeff / 10^scale - the one explicit lossy step. Other targets (including rescaling to another DECIMAL) reject.

Parameters

sthe DECIMAL Series
targetthe target dtype
strictthrow on failures (true) or map them to null

Returns

the cast Series.

Throws

DataFrameException on unsupported targets always, and per

the table when strict.