The reason for this is mutation and transformation. If you have two vectors
a = [1:3]
b = [4:6]
You can make a xlink to one of them with an appointment.
x = a
Now xthey abelong to the same vector [1, 2, 3]. If then assigned btox
x = b
Now you have changed xto a link to the same vector as b.
, .
x[:] = a
a b, [1, 2, 3].
. , Julia .
x[1] = 5.0
[5, 2, 3], Julia Float64 5.0 Int 5.
x[1] = 5.5
InexactError(), 5.5 .
DataFrames, , , DataFrame . , DataFrame
df = DataFrame(A = 1:4, B = ["M", "F", "F", "M"])
, [1, 2, 3, 4] ["M", "F", "F", "M"]. DataFrame .
,
df[:,:A] = float64(df[:,:A])
, [1, 2, 3, 4] Float64. , df[:A], Float64 Int, Int.
df[:A] = float64(df[:A])
, , , DataFrame, Flaot64.
, .