Hi,
I was looking around for a quick way to convert columns of data in a DataFrame into categorical data and found and example in this link. However, when I tried it in my REPL, it didn’t work. Just wondering if this function was relegate or something. See my REPL code below.
julia> versioninfo()
Julia Version 1.9.0-rc2
Commit 72aec423c2 (2023-04-01 10:41 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 20 × 12th Gen Intel(R) Core™ i7-12800H
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
Threads: 1 on 20 virtual cores
julia> df = DataFrame(A = [“A”, “B”, “C”, “D”, “D”, “A”],
B = [“X”, “X”, “X”, “Y”, “Y”, “Y”])
6×2 DataFrame
Row │ A B
│ String String
─────┼────────────────
1 │ A X
2 │ B X
3 │ C X
4 │ D Y
5 │ D Y
6 │ A Y
julia> categorical!(df, :A)
ERROR: UndefVarError:categorical!
not defined
Stacktrace:
[1] top-level scope @ REPL[16]:1
julia> categorical!(df, :B)
ERROR: UndefVarError:categorical!
not defined
Stacktrace:
[1] top-level scope @ REPL[17]:1