Open LSW1980 opened 1 year ago
Does df.fillNa() turn on { inplace: true } by default?
[Getting Started - Danfo.js] section "Filling missing values in specific columns with specific values:"
const dfd = require("danfojs-node")
let data = { "Name": ["Apples", "Mango", "Banana", NaN], "Count": [NaN, 5, NaN, 10], "Price": [200, 300, 40, 250] }
let df = new dfd.DataFrame(data) df.print()
let df_filled = df.fillNa(["Apples", df["Count"].mean()], { columns: ["Name", "Count"] }) df_filled.print()
if we try df.print() again, it is the same as df_filled? So, df.fillNa() turn on { inplace: true } by default? Is this normal?
Thank you
Does df.fillNa() turn on { inplace: true } by default?
[Getting Started - Danfo.js] section "Filling missing values in specific columns with specific values:"
const dfd = require("danfojs-node")
let data = { "Name": ["Apples", "Mango", "Banana", NaN], "Count": [NaN, 5, NaN, 10], "Price": [200, 300, 40, 250] }
let df = new dfd.DataFrame(data) df.print()
let df_filled = df.fillNa(["Apples", df["Count"].mean()], { columns: ["Name", "Count"] }) df_filled.print()
if we try df.print() again, it is the same as df_filled? So, df.fillNa() turn on { inplace: true } by default? Is this normal?
Thank you