How do I graph a line in Julia with an arrow on both sides?

Advertisements Here is my code: using MTH229 using Plots f(x)=x theme(:dark) plot(f,-5,5,linewidth=5,c=:hotpink,legend=false,arrow=true) Here is a picture of the output: plot How do I get the arrow to appear on both ends of the line instead of just one? >Solution : It’s a bit of a hacky solution, but for the example in the question: plot!([-4.99,-5],[f(-4.99),… Read More How do I graph a line in Julia with an arrow on both sides?

How to purge missing values from a DataFrame in Julia?

Advertisements After reading the context, if you felt the title could be enhanced to fit the question and you had an idea, feel free to update it. Suppose I have the following DataFrame: using DataFrames df = DataFrame( g=["a","b","a","c",missing,missing,missing,missing], a=[1,2,3,4,missing,missing,missing,missing], Column1=[missing,missing,missing,missing,false,false,false,true], Column2=[missing,missing,missing,missing,false,true,true,true], Column3=[missing,missing,missing,missing,true,true,false,false], ) # 8×5 DataFrame # Row │ g a Column1 Column2 Column3… Read More How to purge missing values from a DataFrame in Julia?

"ERROR: ArgumentError: Table returned but a single output column was expected" in transform! dataframes

Advertisements I want to perform a simple One-Hot encoding by utilizing DataFrames.jl‘s transform! but I’m unsuccessful. I use the following DataFrame: using DataFrames df = DataFrame( color = ["red", "green", "blue"], x = [1, 2, 3] ) # 3×2 DataFrame # Row │ color x # │ String Int64 # ─────┼─────────────── # 1 │ red… Read More "ERROR: ArgumentError: Table returned but a single output column was expected" in transform! dataframes