Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LSW1980 opened this issue Oct 24, 2023 · 0 comments
Open

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

LSW1980 opened this issue Oct 24, 2023 · 0 comments

Comments

@LSW1980
Copy link

LSW1980 commented Oct 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant