otp.Operation.round#
- Operation.round(precision=None)#
Rounds input column with specified precision.
- Parameters
precision (int) – Number from -12 to 12. Positive precision is precision after the floating point. Negative precision is precision before the floating point.
- Return type
Examples
>>> t = otp.Tick(A=1234.5678) >>> t['B'] = t['A'].round() >>> t['C'] = t['A'].round(2) >>> t['D'] = t['A'].round(-2) >>> otp.run(t) Time A B C D 0 2003-12-01 1234.5678 1235 1234.57 1200.0
See also