DataFrame.shape
Returns an Array representing the dimensionality of the DataFrame.
danfo.DataFrame.shape [source]
Returns:
return Int

Examples

Node
Browser
1
const dfd = require("danfojs-node")
2
3
let data = {"A": [-20.1, 30, 47.3, -20],
4
"B": [34, -4, 5, 6],
5
"C": [20, -20, 30, -40]}
6
let df = new dfd.DataFrame(data, {index: ["a", "b", "c", "d"]})
7
8
console.log(df.shape)
9
10
Copied!
1
Copied!
Output
1
[4,3]
Copied!
Last modified 1yr ago
Copy link
Contents
Examples