Skip to main content

Module decimal

Module decimal 

Source
Expand description

Reads decimal and unsigned integer columns from the text of a csv or json file.

A file reader that decodes a number into a Float64 loses the digits a Float64 can’t hold. Arrow’s own decimal decoding is wrong for some numbers in scientific notation, and its json integer decoding goes through a Float64 for them. So the readers hand over the text of such a column and parse_number_columns parses it.

Enums§

ErrorKind 🔒
TextNumber
The type to parse the text of a column into.

Functions§

parse_decimal128
Parses a decimal number written in plain or scientific notation and returns its value with scale fractional digits, rounded half away from zero.
parse_digits 🔒
Returns the sign of the number in text and the first precision digits at most of |number| * 10^scale. The digits after those are rounded half away from zero with round and dropped without it.
parse_number_array 🔒
parse_number_batch 🔒
parse_number_columns
Parses the string columns of stream that have a type in numbers into columns of that type. numbers has one entry for each column of the stream.
parse_uint64
Parses an unsigned integer written in plain or scientific notation.