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

subset not defined #274

Closed
etnite opened this issue Jul 28, 2021 · 2 comments · Fixed by #282
Closed

subset not defined #274

etnite opened this issue Jul 28, 2021 · 2 comments · Fixed by #282

Comments

@etnite
Copy link

etnite commented Jul 28, 2021

Hello,

I was just using DataFramesMeta and noticed that @subset is having some issues. Trying out one of the examples from the @subset documentation:

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 8

julia> Pkg.status("DataFramesMeta")
      Status `~/.julia/environments/v1.6/Project.toml`
  [1313f7d8] DataFramesMeta v0.8.0

#################

julia> using DataFrames, DataFramesMeta

julia> d = DataFrame(a = [1, 2, missing], b = ["x", "y", missing]);

julia> @subset(d, :a .== 1)
ERROR: LoadError: UndefVarError: subset not defined
Stacktrace:
 [1] subset_helper(x::Symbol, args::Expr)
   @ DataFramesMeta ~/.julia/packages/DataFramesMeta/EDzWO/src/macros.jl:427
 [2] var"@subset"(__source__::LineNumberNode, __module__::Module, x::Any, args::Vararg{Any, N} where N)
   @ DataFramesMeta ~/.julia/packages/DataFramesMeta/EDzWO/src/macros.jl:577
in expression starting at none:1

I haven't tested extensively, but other macros appear to work fine:

julia> @select(d, :a)
3×1 DataFrame
 Row │ a       
     │ Int64?  
─────┼─────────
   11
   22
   3missing 
@pdeffebach
Copy link
Collaborator

What is the status of your DataFrames? I'm guessing it's pre-1.0, which I mistakenly allow for after the addition of the @subset macro.

I will fix this and tag a new version tonight.

@etnite
Copy link
Author

etnite commented Jul 29, 2021

You are correct - I didn't realize my DataFrames package was being held back - it is indeed pre v1.0. I will try to resolve dependencies to update it. In the meantime, thank you for the fix.

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

Successfully merging a pull request may close this issue.

2 participants