Currently, avro_from_df function just takes data type of the column and converts it to corresponding PFA type. It'd help if this function handles the case where a column has some missing values.
Minimal reproducible example:
a = data.frame(col1 = c(1, 2), col2 = c(1.234565, NA))
avro_from_df(a)
I'd expect col2 to be of type avro_union(avro_double, avro_null) and not avro_double.