DataFrame.drop
Drop specified labels from rows or columns.Remove rows or columns by specifying label names and corresponding axis.
Parameters
Type
Description
Default
Examples
Drop columns by specifying the names
const dfd = require("danfojs-node")
let data = { "A": [-20, 30, 47.3, -20],
"B": [34, -4, 5, 6] ,
"C": [20, 20, 30, 30],
"D": ["a", "b", "c", "c"] }
let df = new dfd.DataFrame(data)
df.drop({ columns: ["C", "B"], inplace: true });
df.print()Drop rows by specifying int labels/index
Drop rows by specifying string labels/index
Last updated