Hi all,
I am trying to transpose a DataFrame, following what is explained here: Functions · DataFrames.jl
When applying the ‘permutedims’ function, I get an error that says that this function cannot take a DataFrame as an input.
julia> typeof(df_all)
DataFrame
julia> df_transpose = permutedims(df_all,1)
ERROR: MethodError: no method matching permutedims(::DataFrame, ::Int64)
Closest candidates are:
permutedims(::StridedArray{T, N} where {T, N}, ::Any) at multidimensional.jl:1494
permutedims(::FillArrays.AbstractFill, ::Any) at /home/maf190004/.julia/packages/FillArrays/7oBjc/src/fillalgebra.jl:21
permutedims(::SparseArrays.AbstractSparseMatrixCSC, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/SparseArrays/src/sparsematrix.jl:1068
...
Stacktrace:
[1] top-level scope
@ REPL[200]:1
The same code runs fine in my coauthors Julia installation. I have tried to update, remove and reinstall the suspect packages (DataFrames, SharedArrays). Unfortunately I cannot simply uninstall Julia and perform a clean install, as this is happening in a HPC. Has anyone seen this before?
The same code runs fine in my coauthors Julia installation. I have tried to update, remove and reinstall the suspect packages (DataFrames, SharedArrays). Unfortunately I cannot simply uninstall Julia and perform a clean install, as this is happening in a HPC. Has anyone seen this before?
You should be using a Manifest.toml to control the versions of packages used in your project. Are you using the exact same versions of the packages your co-author is using?
Thank you. This solved my issue. For some reason, DataFrames was only updating to 0.21.8 even after doing Pkg.update(DataFrames). I had to force installation of that version to get 0.22 installed.
Please use Manifest.toml files and proper package management rather than relying on updating the packages. Julia’s package management and compatibility system is really good!