Return the elements of the specified column as a Series
danfo.DataFrame.column(column)
Parameters
Type
Description
Default
column
String
The name of a column in the DataFrame
Examples
Select a single column from a DataFrame
const dfd = require("danfojs-node")
let data = { "Name": ["Apples", "App", "Banana", undefined],
"Count": [NaN, 5, NaN, 10] ,
"Price": [200, 300, 40, 250] }
let df = new dfd.DataFrame(data)
df.column("Name").print()
//Alternatively, you can retrieve columns by using the object property
df['Name'].print() //produces the same result as above