this seems easy, but I can not find any answers. can anyone please let me know?
You can just overwrite it! df.x = df.x .+ 1
1 Like
.+1 is because one is a vector and the other one is an element, right?
also:
df.x .+= 1
Yes! “Broadcasting” with the f.(x) syntax means that you apply the function f to each element of x individually.
1 Like