onetick.py.Operation.__round__#
- Operation.__round__(precision=None)#
Rounds value 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'] = round(t['A']) >>> t['C'] = round(t['A'], 2) >>> t['D'] = round(t['A'], -2) >>> otp.run(t) Time A B C D 0 2003-12-01 1234.5678 1235 1234.57 1200.0