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

**URL:** <https://discourse.julialang.org/t/dataframes-jl-tables-jl-is-smart-enough-to-consume-my-array-of-custom-types-love-it/65819>\
**Category:** General Usage\
**Tags:** dataframes\
**Created:** [August 4, 2021, 3:00pm UTC](https://discourse.julialang.org/t/dataframes-jl-tables-jl-is-smart-enough-to-consume-my-array-of-custom-types-love-it/65819 "2021-08-04T15:00:49Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [August 4, 2021, 7:05pm UTC](https://discourse.julialang.org/t/dataframes-jl-tables-jl-is-smart-enough-to-consume-my-array-of-custom-types-love-it/65819/7 "2021-08-04T19:05:15Z")

</div>

Is there any issue in doing it this way (inspired by [this post](https://discourse.julialang.org/t/array-of-structs-getindex-slicing-and-broadcasting-getfield/21887/3)):

```julia
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

```

---

_[View the full topic](https://discourse.julialang.org/t/dataframes-jl-tables-jl-is-smart-enough-to-consume-my-array-of-custom-types-love-it/65819)._
