Skip to main content

DecimalChunked

Type Alias DecimalChunked 

Source
pub type DecimalChunked = Logical<DecimalType, Int128Type>;
Available on crate feature dtype-decimal only.

Aliased Type§

pub struct DecimalChunked {
    pub phys: ChunkedArray<Int128Type>,
    pub dtype: DataType,
    /* private fields */
}

Fields§

§phys: ChunkedArray<Int128Type>§dtype: DataType

Implementations§

Source§

impl DecimalChunked

Source

pub fn mul_with_scale(&self, rhs: &Self, scale: usize) -> PolarsResult<Self>

Multiplies with the result rounded to scale.

Source

pub fn div_with_scale(&self, rhs: &Self, scale: usize) -> PolarsResult<Self>

Divides with the result rounded to scale.

Source

pub fn rem_with(&self, rhs: &Self, floor: bool) -> PolarsResult<Self>

The exact remainder, with the sign of rhs if floor (as %), else of self.

Source

pub fn int_div(&self, rhs: &Self, floor: bool) -> PolarsResult<Self>

The integer quotient, rounded down if floor (as //), else toward zero.

Source

pub fn int_div_with_scale( &self, rhs: &Self, scale: usize, floor: bool, ) -> PolarsResult<Self>

Self::int_div with the quotient at scale.

Source§

impl DecimalChunked

Source

pub fn precision(&self) -> usize

Source

pub fn scale(&self) -> usize

Source

pub fn with_prec_scale( &self, prec: usize, scale: usize, strict: bool, ) -> PolarsResult<Cow<'_, Self>>

Source

pub fn into_phys_with_prec_scale_or_sentinel( &self, prec: usize, scale: usize, sentinel: i128, ) -> Int128Chunked

Converts self to a physical representation with the given precision and scale, returning the given sentinel value instead for values which don’t fit in the given precision and scale. This can be useful for comparisons.

Source

pub fn prod_reduce(&self) -> Scalar

Trait Implementations§

Source§

impl Add for &DecimalChunked

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl Div for &DecimalChunked

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl IntoSeries for DecimalChunked

Source§

impl LogicalType for DecimalChunked

Source§

fn dtype(&self) -> &DataType

Get data type of ChunkedArray.
Source§

fn get_any_value(&self, i: usize) -> PolarsResult<AnyValue<'_>>

Source§

unsafe fn get_any_value_unchecked(&self, i: usize) -> AnyValue<'_>

Safety Read more
Source§

fn cast_with_options( &self, dtype: &DataType, cast_options: CastOptions, ) -> PolarsResult<Series>

Source§

fn cast(&self, dtype: &DataType) -> PolarsResult<Series>

Source§

impl Mul for &DecimalChunked

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl Sub for &DecimalChunked

Source§

type Output = Result<Logical<DecimalType, Int128Type>, PolarsError>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more