julia> a=DataFrame([1 2 3; 4 missing 6])
2×3 DataFrame
│ Row │ x1 │ x2 │ x3 │
│ │ Int64⍰ │ Int64⍰ │ Int64⍰ │
├─────┼────────┼─────────┼────────┤
│ 1 │ 1 │ 2 │ 3 │
│ 2 │ 4 │ missing │ 6 │
julia> dropmissing!(a)
1×3 DataFrame
│ Row │ x1 │ x2 │ x3 │
│ │ Int64⍰ │ Int64⍰ │ Int64⍰ │
├─────┼────────┼────────┼────────┤
│ 1 │ 1 │ 2 │ 3 │
julia> a
1×3 DataFrame
│ Row │ x1 │ x2 │ x3 │
│ │ Int64⍰ │ Int64⍰ │ Int64⍰ │
├─────┼────────┼────────┼────────┤
│ 1 │ 1 │ 2 │ 3 │
julia> a[:2]
1-element Array{Union{Missing, Int64},1}:
2
it still shows Union{Missing,…} after dropmissing!()
so I can’t put it into most other functions, they cause errors because they aren’t considered to take such array types including missing values.
i wonder how i can solve this problem, the function copy() doesn’t seem to be the answer…