round#

pylibcudf.round.RoundingMethod#

另请参阅 cudf::rounding_method

枚举成员

  • HALF_UP

  • HALF_EVEN

pylibcudf.round.round(Column source, int32_t decimal_places=0, rounding_method round_method=rounding_method.HALF_UP) Column#

将列中的所有值四舍五入到指定的小数位数。

详情请参见round()

Parameters:
sourceColumn

要四舍五入值的列。

decimal_places: int32_t, optional

要舍入的小数位数(默认值为0)

round_method: rounding_method, optional

用于舍入每个值的方法。 可以是 { RoundingMethod.HALF_UP, RoundingMethod.HALF_EVEN } 之一 (默认 rounding_method.HALF_UP)

Returns:
pylibcudf.Column

一个带有四舍五入值的列