Series.unique
Obtain the unique value in a Series
danfo.Series.unique()
Parameters: None
Returns: Series
Example
Node
1
const dfd = require("danfojs-node")
2
3
let data1 = [1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 22, 8, 5, 5, 5]
4
let sf = new dfd.Series(data1)
5
6
sf.unique().print()
Copied!
Output
1
╔═══╤════╗
2
║ 0 │ 1 ║
3
╟───┼────╢
4
║ 1 │ 2 ║
5
╟───┼────╢
6
║ 2 │ 3 ║
7
╟───┼────╢
8
║ 3 │ 4 ║
9
╟───┼────╢
10
║ 4 │ 5 ║
11
╟───┼────╢
12
║ 5 │ 6 ║
13
╟───┼────╢
14
║ 6 │ 7 ║
15
╟───┼────╢
16
║ 7 │ 8 ║
17
╟───┼────╢
18
║ 8 │ 22 ║
19
╚═══╧════╝
Copied!
Copy link