In Python, if you have a variable
numbers = 5 and then in the next like you write
numbers = 55 , the variable’s value is updated.
While using Pluto.jl, I declared a variable called
y_axis . I decided to change the value of this variable in another cell but I am getting this error:
Multiple definitions for y_axis. Combine all definitions into a single reactive cell using a `begin ... end` block.
Why doesn’t Pluto.jl let me change a variable? Let me show you exactly what I am talking about. This is the 1st cell:
begin countries_data_labels = ["Italy", "Germany", "Pakistan", "Turkey", "United Kingdom"]; y_axis = DataFrame() # Creating an empty dataframe to populate the y-axis when plotting graphs. ... end
And this is 2 cells below:
begin ... y_axis = select!(y_axis, Not([:One_million])); end
I’m sure Pluto allows changing a variable without having to create a giant block of a cell but I don’t know how. I know that I can re-assign values to the same variable but I don’t want to have to do that in one cell.