Series.loc
Access a group of rows by label(s) or a boolean array.
Parameters
Type
Description
Default
Examples
Indexing by specific row index
const dfd = require("danfojs-node")
const data = [12, 34, 2.2, 2, 30, 30, 2.1, 7]
const index = ["a", "b", "c", "d", "e", "f", "g", "h"]
let s = new dfd.Series(data, { index })
s.print()
s.loc(["a", "g"]).print()Index by a slice of row
By specifying a start index in a slice, all values after that index are returned.
Slice Series by boolean condition
Last updated