How to convert string column of dataframe to float with missing values?

if you convert the xlsx file to csv first, a lot of this can be done using CSV

using CSV, DataFrames, Dates

a = CSV.File("answers.csv", missingstring="-", types=Dict([1,2].=>DateTime),
    dateformat=DateFormat("d u Y H:M"))
DataFrame(a)
Start End Q1 Q2 Q3
DateTime DateTime Float64 Float64 Float64?
2021-01-10T15:00:00 2021-01-10T17:00:00 5.5 2.7 missing
2021-01-10T15:03:00 2021-01-10T16:53:00 2.7 3.0 1.5

See ?CSV.File and ?DateFormat for more info
2 Likes