DataFrame.mul
Get Multiplication of dataframe and other, element-wise (binary operator mul).
Parameters
Type
Description
Default
Examples
Multiplication of scalar with DataFrame along default axis 1
const dfd = require("danfojs-node")
let data = {
"Col1": [10, 45, 56, 10],
"Col2": [23, 20, 10, 24]
}
let df = new dfd.DataFrame(data)
let df_new = df.mul(2)
df_new.print()╔════════════╤═══════════════════╤═══════════════════╗
║ │ Col1 │ Col2 ║
╟────────────┼───────────────────┼───────────────────╢
║ 0 │ 20 │ 46 ║
╟────────────┼───────────────────┼───────────────────╢
║ 1 │ 90 │ 40 ║
╟────────────┼───────────────────┼───────────────────╢
║ 2 │ 112 │ 20 ║
╟────────────┼───────────────────┼───────────────────╢
║ 3 │ 20 │ 48 ║
╚════════════╧═══════════════════╧═══════════════════╝Multiplication of Series with DataFrame along axis 0
Multiplication of DataFrame with another DataFrame
Multiplication of Array with DataFrame along axis 0
Multiplication works inplace
Last updated