# LoadError: UndefVarError: subset not defined

**URL:** https://discourse.julialang.org/t/loaderror-undefvarerror-subset-not-defined/68199
**Category:** New to Julia
**Tags:** question, error, error-message
**Created:** [September 15, 2021, 8:32am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-subset-not-defined/68199 "2021-09-15T08:32:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Billpete002](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/billpete002/32/35091_2.png) [@Billpete002](https://discourse.julialang.org/u/Billpete002)
#### Post date: [September 15, 2021, 8:32am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-subset-not-defined/68199/1 "2021-09-15T08:32:16Z")

</div>

So I installed and loaded the package Lathe.jl and it seemed to have a conflict with DataFrameMeta.jl. Now it seems my DataFrameMeta is corrupted with subset not working:

```julia
rawdf = @subset(rawdf, :has_iata .== "Yes", :iata .!= "9999999") 

```

Error code:

```julia
ERROR: LoadError: UndefVarError: subset not defined
Stacktrace:
  [1] subset_helper(::Symbol, ::Expr, ::Vararg{Expr, N} where N)
    @ DataFramesMeta C:\Users\xxxxxx\.julia\packages\DataFramesMeta\EDzWO\src\macros.jl:427
  [2] var"@subset"( __source__ ::LineNumberNode, __module__ ::Module, x::Any, args::Vararg{Any, N} where N)
    @ DataFramesMeta C:\Users\xxxxx\.julia\packages\DataFramesMeta\EDzWO\src\macros.jl:577
  [3] eval
    @ .\boot.jl:360 [inlined]
  [4] eval
    @ .\Base.jl:39 [inlined]
  [5] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer c:\Users\xxxxxx\.vscode\extensions\julialang.language-julia-1.4.0\scripts\packages\VSCodeServer\src\repl.jl:157
  [6] (::VSCodeServer.var"#69#71"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer c:\Users\xxxxxx\.vscode\extensions\julialang.language-julia-1.4.0\scripts\packages\VSCodeServer\src\repl.jl:123
  [7] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging .\logging.jl:491
  [8] with_logger
    @ .\logging.jl:603 [inlined]
  [9] (::VSCodeServer.var"#68#70"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer c:\Users\xxxxxx\.vscode\extensions\julialang.language-julia-1.4.0\scripts\packages\VSCodeServer\src\repl.jl:124
 [10] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [11] invokelatest(::Any)
    @ Base .\essentials.jl:706
 [12] macro expansion
    @ c:\Users\xxxxxx\.vscode\extensions\julialang.language-julia-1.4.0\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
 [13] (::VSCodeServer.var"#53#54")()
    @ VSCodeServer .\task.jl:411
in expression starting at REPL[72]:1

```

These are all of the things I have tried without luck:

Restarted VSCode  
Wiped the library folder and the registry folder and reloaded all packages (without Lathe)  
Updated DataFrameMeta  
Using the gc command  
I’ve also tried the simple DataFramesMeta.@subset() and get the same error

stopping short of wiping Julia entirely and starting over from scratch is there some option I am missing?

---

<div class="post-metadata">

### Author: ![Billpete002](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/billpete002/32/35091_2.png) [@Billpete002](https://discourse.julialang.org/u/Billpete002)
#### Post date: [September 15, 2021, 8:44am UTC](https://discourse.julialang.org/t/loaderror-undefvarerror-subset-not-defined/68199/2 "2021-09-15T08:44:25Z")

</div>

Found this:

> <https://github.com/JuliaData/DataFramesMeta.jl/issues/273>
>
> I'm trying to use \`@subset\` and I'm getting this error:
> !\[image\](https://user-i…mages.githubusercontent.com/69864603/127361482-60d3c266-c33e-41a6-a16e-ccd2513e5e67.png)
> 
> I'm running Julia v1.6.0 and DataFramesMeta v0.8.0.
> 
> The example I'm running is this one:
> \`d = DataFrame(a = \[1, 2, missing\], b = \["x", "y", missing\]); @subset(d, :a .== 1)\`
> 
> Note: I ran \`using DataFrames; using DataFramesMeta\` before this.

Seems like it was a recent known issue and that I need the most recent versions of DataFrames… Thinking that I had just wiped and reinstalled all the packages that they would be the newest version I thought to check and lo and behold:

![image](https://global.discourse-cdn.com/julialang/original/3X/c/4/c4b06f327abc7c04b36405e5d5b25dd05eddeaa2.png)

I will post if this is the solution or not, but I am surprised that pkg.add(“DataFrames”) didn’t seem to add the latest version…
