Importing Query, getting "@replacena" not defined

Hi, I’m trying to practise using Query for data cleaning and saw this simple example in the documentation of the library.

using Query, DataFrames

df = DataFrame(a=[1,missing,3], b=[4,5,6])

q = df |> @replacena(0) |> DataFrame

println(q)

So decided to try and replicate it myself importing Queryverse instead, but I’m getting this error:

ERROR: UndefVarError: @replacena not defined
Stacktrace:
[1] top-level scope
[2] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1088

Thought maybe Queryverse wasn’t importing Query well so tried importing Query with

using Query

And then tried running the code again, but got the same error.

Finally I have tried using other na macros from Query (“dropna”, “dissallowna”) and still got the same error message of them not being defined.

Also when looking them up with ? in the julia repl, they don’t exist.

help?> @replacena
No documentation found.

Binding @replacena does not exist

While other Query macros such as “select” do exist.

help?> @select
@select(args…)

Select columns from a table using commands in order.

Is anyone else having this same problem?

Which version of Query are you using?

(@v1.5) pkg> status
Status C:\Users\RoniD\.julia\environments\v1.5\Project.toml
[add582a8] MLJ v0.12.0
[1a8c2f83] Query v0.12.2
[612083be] Queryverse v0.6.1

It seems thats the problem.
Checked out the Query GitHub repo versions changelog and found that na related macros where introduced in Query version 1.0.0

Tried to update packages to get that version using

] update

But it didn’t found any packages able to update

(@v1.5) pkg> update
Updating registry at C:\Users\RoniD\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
No Changes to C:\Users\RoniD\.julia\environments\v1.5\Project.toml
No Changes to C:\Users\RoniD\.julia\environments\v1.5\Manifest.toml

Also tried using

] update Query

Still didn’t got to update Query

(@v1.5) pkg> update Query
Updating registry at C:\Users\RoniD\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
No Changes to C:\Users\RoniD\.julia\environments\v1.5\Project.toml
No Changes to C:\Users\RoniD\.julia\environments\v1.5\Manifest.toml

Also checked JuliaHub and Query is in version 1.0.0 there too.

Would appreciate if you could help identifying why my Pkg isn’t updating Query to it’s lastest released version.

Thanks for replying too!

Try ] add Query@1.0 to see what’s holding you back

I’m getting this error.

(@v1.5) pkg> add Query@1.0
Updating registry at C:\Users\RoniD\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package Queryverse [612083be]:
Queryverse [612083be] log:
├─possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.1, 0.5.0, 0.6.0-0.6.1] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0, 0.3.0-0.3.1, 0.5.0, 0.6.0-0.6.1]
└─restricted by compatibility requirements with Query [1a8c2f83] to versions: uninstalled — no versions left
└─Query [1a8c2f83] log:
├─possible versions are: [0.10.0-0.10.1, 0.11.0, 0.12.0-0.12.2, 1.0.0] or uninstalled
└─restricted to versions 1.0 by an explicit requirement, leaving only versions 1.0.0

Did you install a specific version of Queryverse? This looks very odd, but I don’t really understand how Queryverse works tbh. Might be easiest to just try in a clean environment.

Went all the way to the Project.toml of Queryverse on my computer.

name = “Queryverse”
uuid = “612083be-0b0f-5412-89c1-4e7c75506a58”
version = “0.6.1”

[deps]
DataTables = “743a1d0a-8ebc-4f23-814b-50d006366bc6”
DataVoyager = “5721bf48-af8e-5845-8445-c9e18126e773”
CSVFiles = “5d742f6a-9f54-50ce-8119-2520741973ca”
VegaLite = “112f6efa-9a02-5b7d-90c0-432ed331239a”
Query = “1a8c2f83-1ff3-5112-b086-8aa67b057ba1”
FeatherFiles = “b675d258-116a-5741-b937-b79f054b0542”
ParquetFiles = “46a55296-af5a-53b0-aaa0-97023b66127f”
StatFiles = “1463e38c-9381-5320-bcd4-4134955f093a”
FileIO = “5789e2e9-d7fb-5bc7-8068-2c6fae9b9549”
ExcelFiles = “89b67f3b-d1aa-5f6f-9ca4-282e8d98620d”
DataFrames = “a93c6f00-e57d-5684-b7b6-d8193f3e46c0”
DataValues = “e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5”
Reexport = “189a3867-3050-52da-a836-e630ba90ab69”
IterableTables = “1c8ee90f-4401-5389-894e-7a04a3dc0f4d”

[extras]
Test = “8dfed614-e22c-5e08-85e1-65c5234f0b40”

[compat]
DataTables = “0.1”
DataVoyager = “0.3, 1”
CSVFiles = “1”
VegaLite = “1, 2.0”
Query = “0.12”
FeatherFiles = “0.8”
ParquetFiles = “0.2”
StatFiles = “0.8”
FileIO = “1”
julia = “1”
ExcelFiles = “1”
DataFrames = “0.20, 0.21”
DataValues = “0.4.4”
Reexport = “0.2”
IterableTables = “1”

[targets]
test = [“Test”]

It seems like the problem comes from Queryverse 0.6.1 not being defined as compatible with Query 1.0 there.

Thanks for the help!

Argh, sorry, my bad, I forgot to tag a Queryverse.jl release. https://github.com/JuliaRegistries/General/pull/19998 should fix this.