Examples

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

Divide by constant with reverse version:

In [3]:
df.div(10)
Out[3]:
angles degrees
ellipse 0.0 36.0
triangle 0.3 18.0
rhombus 0.4 36.0
In [4]:
df.truediv(10)
Out[4]:
angles degrees
ellipse 0.0 36.0
triangle 0.3 18.0
rhombus 0.4 36.0