juliaacademy / dataframes Goto Github PK
View Code? Open in Web Editor NEWWelcome to DataFrames.jl with Bogumił Kamiński
License: MIT License
Welcome to DataFrames.jl with Bogumił Kamiński
License: MIT License
About 3000 people have started this video: First Steps With Data Frames (2/6)
The audience was 1,519 for the third video. I'm postulating half of the audience dropped out because of a combination of poor sound quality, and errors in the automatic set-up.
I have English as a first language, and I expect many of the audience have English as a second language. If I'm struggling to follow the audio track, then people with English second with find it very difficult.
The DataFrames package is very nicely put together - thanks!
Students are reporting that they are unable to generate certificates after completion of the course. Thank you!
Hey Professor Kamiński,
Thanks for the awesome DataFrames.jl package and the pragmatic tutorial on JuliaAcademy!
It seems we need an additional line of code, "] activate ./", before we call “] status” in the first notebook "1. Environment setup.ipynb".
I'm using nteract 0.24.0 with Julia 1.4.2 on a Mac. Without "] activate ./", the "] status" looks for Project.toml file in the default Julia path (~/.julia/environments/v1.4/Project.toml) instead of the current working path where the notebook locates.
Thanks,
Adam
There seems to be some conflict with the version of CategoricalArrays listed in the Manifest.toml. I can load DataFrames in the Julia REPL, but when I try to run the Julia notebook First steps with data frames.ipynb
I get a conflict with CategoricalArrays after using DataFrames
.
┌ Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
└ @ Base loading.jl:1260
ERROR: LoadError: ArgumentError: Package CategoricalArrays does not have Compat in its dependencies:
- If you have CategoricalArrays checked out for development and have
added Compat as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with CategoricalArrays
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:905
[2] include(::Module, ::String) at ./Base.jl:377
[3] top-level scope at none:2
[4] eval at ./boot.jl:331 [inlined]
[5] eval(::Expr) at ./client.jl:449
[6] top-level scope at ./none:3
in expression starting at /Users/user888/.julia/packages/CategoricalArrays/dmrjI/src/CategoricalArrays.jl:11
ERROR: LoadError: Failed to precompile CategoricalArrays [324d7699-5711-5eae-9e2f-1d82baa6b597] to /Users/user888/.julia/compiled/v1.4/CategoricalArrays/RHXoP_Ek050.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922
[6] include(::Module, ::String) at ./Base.jl:377
[7] top-level scope at none:2
[8] eval at ./boot.jl:331 [inlined]
[9] eval(::Expr) at ./client.jl:449
[10] top-level scope at ./none:3
in expression starting at /Users/user888/.julia/packages/DataFrames/S3ZFo/src/DataFrames.jl:5
Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to /Users/mj847/.julia/compiled/v1.4/DataFrames/AR9oZ_Ek050.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
[3] _require(::Base.PkgId) at ./loading.jl:1029
[4] require(::Base.PkgId) at ./loading.jl:927
[5] require(::Module, ::Symbol) at ./loading.jl:922
[6] top-level scope at In[1]:1
Tested with following package versions
Status `~/.julia/environments/v1.4/Project.toml`
[c52e3926] Atom v0.12.10
[324d7699] CategoricalArrays v0.7.7
[35d6a980] ColorSchemes v3.9.0
[5ae59095] Colors v0.12.0
[f65535da] Convex v0.13.3
[a93c6f00] DataFrames v0.20.2
[31c24e10] Distributions v0.22.6
[2fe49d83] Expectations v1.4.0
[f6369f11] ForwardDiff v0.10.10
[38e38edf] GLM v1.3.9
[60bf3e95] GLPK v0.13.0
[ea4f424c] Gen v0.3.2 #master (https://github.com/probcomp/Gen)
[7073ff75] IJulia v1.21.2
[c601a237] Interact v0.10.3
[b6b21f68] Ipopt v0.6.1
[c8e1da08] IterTools v1.3.0
[42fd0dbc] IterativeSolvers v0.8.4
[4076af6c] JuMP v0.21.2
[e5e0dc1b] Juno v0.8.1
[ba0b0d4f] Krylov v0.5.1
[5c8ed15e] LinearOperators v1.1.0
[2fda8390] LsqFit v0.10.0
[6f286f6a] MultivariateStats v0.7.0
[429524aa] Optim v0.21.0
[1dea7af3] OrdinaryDiffEq v5.36.0
[3b7a836e] PGFPlots v3.2.1
[91a5bcdd] Plots v1.2.3
[f27b6e38] Polynomials v1.0.4 #master (https://github.com/JuliaMath/Polynomials.jl.git)
[140ffc9f] ProximalAlgorithms v0.3.1
[a725b495] ProximalOperators v0.10.3
[6f49c342] RCall v0.13.6
[c946c3f1] SCS v0.6.6
[682df890] Stan v6.0.4
[c1514b29] StanSample v2.1.3
[2913bbd2] StatsBase v0.32.2
[c751599d] ToeplitzMatrices v0.6.1
[0f1e0344] WebIO v0.8.13 #master (https://github.com/JuliaGizmos/WebIO.jl)
the notebook Environment setup.ipynb has some important errors - that should be simple to correct by someone with masterful experience in conda/julia
matplotlib
python library is not installed on my base system, so the notebook fails. Other students have experienced other similar problemsFully reproducible environments are the key.
I believe Julia uses conda
internally to build python environments. See how IJulia
loads - it uses conda
to establish a Jupyter notebook environment. I've only been trying Julia for a few days, so I haven't enough experience to help yet. I have seen a fully worked example that started with disconnecting from the local python environment using ENV["PYTHON"]=""
, and then using conda within julia, to build a python environment. I can't find that example again.
See:
I started the course and installed all needed packages (with more recent versions). However, I missed some details namely the environment activation.
As a newcomer to Julia language some things still go unoticed to me and the environment activation is a thing I learned few minutes ago when trying to fix a bug on the second notebook. As I tried to run the cell using DataFrames
I was getting the error:
ERROR: LoadError: ArgumentError: Package PrettyTables does not have LaTeXStrings in its dependencies ...
There are few helpful pages on this matter, specially to newcomers as I am. However one term caught my attention: environment. In one page someone refers to a global environment (@1.8.0 in my case).
I then tried all cited solutions as instantiate
, resolve
, update
, etc. Nothing was fixing the related error. I went to Project.toml and Manifest.toml (of my @1.8.0), everything seemed right with no error and with the dependencies declared. I could not understand what was causing the error.
I finally came to this issue tab and opened #1. The issue was similar to mine and reading the answers things started to became clear. Then I read #2 and #12 and my mind opened to the real solution: I had to set the environment. After a fast search on google I found how to change the global environment to the one that came together with this repo. After activation was done the status
asked to download missing packages with instantiate
. All things done and ok, the error is gone.
I made this entire 'report' for two reasons. First, to help other newcomers as I am, who will face this same problem; second, to ask for an update in the first notebook to make it clear what environment setup stands for and a link to the respective documentation (for those who missed this part as I did). A cell with pkg> activate .
command might help.
One final and important information: I'm using VS Code, and my Jupyter extension did not automatically activate the correct environment. That's another reason for this entire experience I had.
In the file "2. First steps with data frames.ipynb" the variables xlim and ylim cannot be assigned as currently shown without errors (running it in the shell). I get the following:
ERROR : cannot assign a value to variable PyPlot.xlim from module Main
I suggest resolving this by replacing xlim / ylim with xlim0 / ylim0 everywhere in the notebook.
(Thank you for the amazing package!)
Had an issue with 1. Environment setup.ipynb
where running ] instantiate
as explained in the notebook did not work. First I had to run:
using Pkg
Pkg.activate(".")
then the command worked
@logankilpatrick - I have updated the tutorial to DataFrames.jl 1.1.1. As I was planning this move earlier the videos no not require updating (I made the codes in a way that still works the same way as in 0.22 version).
However, could you please update https://juliaacademy.com/ and https://juliaacademy.com/p/introduction-to-dataframes-jl1 page to indicate that the material is both for DataFrames.jl 0.22 and 1.1 (stressing visually 1.1, as 0.22 is not maintained any more and should not be used).
Thank you!
The error (2 in fact) is missing of a colon in front of 'name' in the last two examples of this passage which should read like this:
It can be achieved like this:
df1_2[:, :name] = df_raw.name
or like this
df1_2.name = df_raw[:, :name]
We could also write:
df1_2[:, :name] = df_raw[:, :name]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.