Is there a way to update a column of a dataframe to an array in julia?


#1

this seems easy, but I can not find any answers. can anyone please let me know?


#2

You can just overwrite it! df.x = df.x .+ 1


#3

.+1 is because one is a vector and the other one is an element, right?


#4

also:

df.x .+= 1

#5

Yes! “Broadcasting” with the f.(x) syntax means that you apply the function f to each element of x individually.