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

dropna #1884

Closed
waweruk2001 opened this issue Jul 16, 2019 · 3 comments
Closed

dropna #1884

waweruk2001 opened this issue Jul 16, 2019 · 3 comments

Comments

@waweruk2001
Copy link

Hi
its me again,
i keep getting this message: ERROR: UndefVarError: dropna not defined..
this is the plot i am trying to draw;
using Plots

julia> plots.histogram(dropna(train[:ApplicantIncome]),bins=50, xlabel="ApplicantIncome",labels="frequency")
ERROR: UndefVarError: dropna not defined
Please assist

@bkamins
Copy link
Member

bkamins commented Jul 16, 2019

There is no such function as dropna in DataFrames.jl (nor any package it exports, nor in Base; this is a function that I think was removed a long time ago).

There is a function skipmissing that is defined in Base. And probably this is what you want to use:

plots.histogram(skipmissing(train.ApplicantIncome),
                          bins=50, xlabel="ApplicantIncome", labels="frequency")

@waweruk2001
Copy link
Author

thank you so much ... i am learning data science using julia at this site: https://www.analyticsvidhya.com/blog/2017/10/comprehensive-tutorial-learn-data-science-julia-from-scratch/
and i had copied this instruction directly from their site.
thank you very much for your help

@bkamins
Copy link
Member

bkamins commented Jul 16, 2019

It is a very nice resource, but unfortunately it is significantly outdated (note that it uses Julia 0.6 which is long gone now).

In order to get an understanding how DataFrames.jl package works under its current version you can check out https://github.com/bkamins/Julia-DataFrames-Tutorial.

@bkamins bkamins closed this as completed Jul 16, 2019
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

2 participants