當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Python cudf.Series.floor用法及代碼示例

用法:

Series.floor()

將每個值向下舍入到不大於原始值的最大整數值。

返回

DataFrame或Series

每個元素的 floor 值。

例子

>>> import cudf
>>> series = cudf.Series([-1.9, 2, 0.2, 1.5, 0.0, 3.0])
>>> series
0   -1.9
1    2.0
2    0.2
3    1.5
4    0.0
5    3.0
dtype: float64
>>> series.floor()
0   -2.0
1    2.0
2    0.0
3    1.0
4    0.0
5    3.0
dtype: float64

相關用法


注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.Series.floor。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。