Skip to content

Does df.fillNa() turn on { inplace: true } by default? #611

Description

@LSW1980

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions