DataFrames.jl (Tables.jl) is smart enough to consume my array of custom types...love it

Is there any issue in doing it this way (inspired by this post):

DayWmax(t::DayWeather) = (tmax = t.temp.max, humidity = t.humidity, windspeed = t.wind_speed)  # assessor function

df = DataFrame(DayWmax.(fetch_weather(url, params).daily))

8×3 DataFrame
 Row │ tmax     humidity  windspeed 
     │ Float64  Int64     Float64   
─────┼──────────────────────────────
   1 │   83.97        74       7.9
   2 │   86.41        58       9.42
   3 │   86.36        64      12.71
   4 │   84.34        67      11.34
   5 │   85.37        69       9.69
   6 │   86.45        66       9.51
   7 │   87.64        59       9.42
   8 │   87.93        60      10.85
1 Like