decimalCastTo
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
s | the source Series (STRING, integer or float kind) |
target | the DECIMAL target dtype (precision/scale from its meta) |
strict | throw on failures (true) or map them to null |
Returns
the DECIMAL Series.
Throws
DataFrameException on unsupported sources always, and per
the table when strict.