Someting like
df[!, :x2] = convert.(Int, df[:, :x2])
will change types types. Note the ! and :. See
!
: