DataFrame.axis
Return an Object containing the axes of the DataFrame. It has the row axis labels and column axis labels as the only members. They are returned in that order.
danfo.DataFrame.axis [source]
Returns:
return Object

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
7
let df = new dfd.DataFrame(data, {index: ["a", "b", "c", "d"]})
8
9
console.log(df.axis)
10
11
Copied!
1
Copied!
Output
1
{ index: [ 'a', 'b', 'c', 'd' ], columns: [ 'A', 'B', 'C' ] }
Copied!
Last modified 17d ago
Copy link
Contents
Examples