Help with appending row in read in DataFrame (weird behavior)

When reading the file back use:

GMM_data = CSV.read(“/users/miguelborrero/Desktop/Energy_Transitions/Data/GMM_data.csv”, DataFrame, types=Float64)

as I assume you want to store floats in the columns.

The issue is that when reading back empty data frame CSV.read cannot infer eltype of columns, and assumes they allow only missing values. Therefore you need to pass a hint what is the eltype you want to accept.

2 Likes