Examples

In [6]:
import numpy as np
import pandas as pd
In [7]:
df = pd.DataFrame({'angles': [0, 3, 4],
                   'degrees': [360, 180, 360]},
                  index=['ellipse', 'right triangle', 'rhombus'])
df
Out[7]:
angles degrees
ellipse 0 360
right triangle 3 180
rhombus 4 360

Add a scalar with operator version which return the same results:

In [8]:
df.rmod
Out[8]:
<bound method _arith_method_FRAME.<locals>.f of                 angles  degrees
ellipse              0      360
right triangle       3      180
rhombus              4      360>