I have a DataFrame that was created by importing a CSV. Then I applied several transformations. Now when I run describe on it I get some columns that report Union{Missing, Float64} as type and others report Float64?.
What is the difference? Both columns have Float64 type and contain missing values.
you canβt possibly have missing values in the Float64 column. But you certainly can have columns of Union{Missing, Float64} but really no longer have any missings, in which case you can use: disallowmissing!
if you see a T? with a question mark that means Union{Missing, T}. As described in the Getting Started section of docs: Getting Started Β· DataFrames.jl
Ok, so they are the same.
Itβs confusing that two number columns that contain missing values are marked one as Union{Missing, Float64} and the other column as Float64?
Good question.
I had some time today to investigate and came up with the following conclusion: itβs just a matter of display real estate.
If the column name is short, then there would not be enough space to fit the Union{...} header