otp.math.floor#

floor(value)#

Returns a long integer value representing the largest integer that is less than or equal to the value.

Parameters

value (int, float, Operation, Column) –

Return type

Operation

Examples

>>> data = otp.Ticks(A=[-1.7, -1.5, -1.2, -1, 0 , 1, 1.2, 1.5, 1.7])
>>> data['FLOOR'] = otp.math.floor(data['A'])
>>> otp.run(data)
                     Time    A  FLOOR
0 2003-12-01 00:00:00.000 -1.7     -2
1 2003-12-01 00:00:00.001 -1.5     -2
2 2003-12-01 00:00:00.002 -1.2     -2
3 2003-12-01 00:00:00.003 -1.0     -1
4 2003-12-01 00:00:00.004  0.0      0
5 2003-12-01 00:00:00.005  1.0      1
6 2003-12-01 00:00:00.006  1.2      1
7 2003-12-01 00:00:00.007  1.5      1
8 2003-12-01 00:00:00.008  1.7      1