Series.nunique

Obtain the number of unique values in a series

danfo.Series.nunique() [source]

Parameters: None

Returns: int

Example

Node
Node
const dfd = require("danfojs-node")
let data1 = [1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 22, 8, 5, 5, 5]
let sf = new dfd.Series(data1)
console.log(sf.nunique())
Ouptut
Ouptut
9