vDataFrame[].div

In [ ]:
vDataFrame[].div(x: float)

Divides the vcolumn by the input element.

Parameters

Name Type Optional Description
x
float
❌
Input number.

Returns

vDataFrame : self.parent

Example

In [53]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic["age"])
123
age
Numeric(6,3)
12.000
230.000
325.000
439.000
571.000
647.000
7[null]
824.000
936.000
1025.000
1145.000
1242.000
1341.000
1448.000
15[null]
1645.000
17[null]
1833.000
1928.000
2017.000
2149.000
2236.000
2346.000
24[null]
2527.000
26[null]
2747.000
2837.000
29[null]
3070.000
3139.000
3231.000
3350.000
3439.000
3536.000
36[null]
3730.000
3819.000
3964.000
40[null]
41[null]
4237.000
4347.000
4424.000
4571.000
4638.000
4746.000
48[null]
4945.000
5040.000
5155.000
5242.000
53[null]
5455.000
5542.000
56[null]
5750.000
5846.000
5950.000
6032.500
6158.000
6241.000
63[null]
64[null]
6529.000
6630.000
6730.000
6819.000
6946.000
7054.000
7128.000
7265.000
7344.000
7455.000
7547.000
7637.000
7758.000
7864.000
7965.000
8028.500
81[null]
8245.500
8323.000
8429.000
8518.000
8647.000
8738.000
8822.000
89[null]
9031.000
91[null]
9236.000
9355.000
9433.000
9561.000
9650.000
9756.000
9856.000
9924.000
100[null]
Rows: 1-100 of 1234 | Column: age | Type: numeric(6,3)
In [54]:
titanic["age"].div(2)
123
age
Numeric(24,21)
11.000000000000000000000
215.000000000000000000000
312.500000000000000000000
419.500000000000000000000
535.500000000000000000000
623.500000000000000000000
7[null]
812.000000000000000000000
918.000000000000000000000
1012.500000000000000000000
1122.500000000000000000000
1221.000000000000000000000
1320.500000000000000000000
1424.000000000000000000000
15[null]
1622.500000000000000000000
17[null]
1816.500000000000000000000
1914.000000000000000000000
208.500000000000000000000
2124.500000000000000000000
2218.000000000000000000000
2323.000000000000000000000
24[null]
2513.500000000000000000000
26[null]
2723.500000000000000000000
2818.500000000000000000000
29[null]
3035.000000000000000000000
3119.500000000000000000000
3215.500000000000000000000
3325.000000000000000000000
3419.500000000000000000000
3518.000000000000000000000
36[null]
3715.000000000000000000000
389.500000000000000000000
3932.000000000000000000000
40[null]
41[null]
4218.500000000000000000000
4323.500000000000000000000
4412.000000000000000000000
4535.500000000000000000000
4619.000000000000000000000
4723.000000000000000000000
48[null]
4922.500000000000000000000
5020.000000000000000000000
5127.500000000000000000000
5221.000000000000000000000
53[null]
5427.500000000000000000000
5521.000000000000000000000
56[null]
5725.000000000000000000000
5823.000000000000000000000
5925.000000000000000000000
6016.250000000000000000000
6129.000000000000000000000
6220.500000000000000000000
63[null]
64[null]
6514.500000000000000000000
6615.000000000000000000000
6715.000000000000000000000
689.500000000000000000000
6923.000000000000000000000
7027.000000000000000000000
7114.000000000000000000000
7232.500000000000000000000
7322.000000000000000000000
7427.500000000000000000000
7523.500000000000000000000
7618.500000000000000000000
7729.000000000000000000000
7832.000000000000000000000
7932.500000000000000000000
8014.250000000000000000000
81[null]
8222.750000000000000000000
8311.500000000000000000000
8414.500000000000000000000
859.000000000000000000000
8623.500000000000000000000
8719.000000000000000000000
8811.000000000000000000000
89[null]
9015.500000000000000000000
91[null]
9218.000000000000000000000
9327.500000000000000000000
9416.500000000000000000000
9530.500000000000000000000
9625.000000000000000000000
9728.000000000000000000000
9828.000000000000000000000
9912.000000000000000000000
100[null]
Out[54]:
Rows: 1-100 of 1234 | Column: age | Type: numeric(24,21)

See Also

vDataFrame[].apply Applies a function to the input vcolumn.