Series.unique

Obtain the unique value in a Series

danfo.Series.unique()

Parameters: None

Returns: Series

Example

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)

sf.unique().print()
╔═══╤════╗
║ 0 │ 1  ║
╟───┼────╢
║ 1 │ 2  ║
╟───┼────╢
║ 2 │ 3  ║
╟───┼────╢
║ 3 │ 4  ║
╟───┼────╢
║ 4 │ 5  ║
╟───┼────╢
║ 5 │ 6  ║
╟───┼────╢
║ 6 │ 7  ║
╟───┼────╢
║ 7 │ 8  ║
╟───┼────╢
║ 8 │ 22 ║
╚═══╧════╝

Last updated