DataFrame.size

Return an int representing the number of elements in this object. Return the number of rows if Series. Otherwise return the number of rows times number of columns if DataFrame.

danfo.DataFrame.size [source]

Returns:

return Int

Examples

Node
Browser
Node
const dfd = require("danfojs-node")
let data = {"A": [-20.1, 30, 47.3, -20],
"B": [34, -4, 5, 6],
"C": [20, -20, 30, -40]}
let df = new dfd.DataFrame(data, {index: ["a", "b", "c", "d"]})
console.log(df.size)
Browser
Output
Output
12