Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 572 Bytes

series.nunique.md

File metadata and controls

34 lines (25 loc) · 572 Bytes
description
Returns the number of unique values in a series

Series.nUnique

danfo.Series.nUnique() [source]

Parameters: None

Returns: int

Example

{% tabs %} {% tab title="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())

{% endtab %} {% endtabs %}

{% tabs %} {% tab title="Ouptut" %}

9

{% endtab %} {% endtabs %}