# How to add metadata info to a DataFrame?

**URL:** <https://discourse.julialang.org/t/how-to-add-metadata-info-to-a-dataframe/11168>\
**Category:** Data\
**Tags:** dataframes, metadata\
**Created:** [May 26, 2018, 3:21pm UTC](https://discourse.julialang.org/t/how-to-add-metadata-info-to-a-dataframe/11168 "2018-05-26T15:21:35Z")\
**Posts on this page:** 1\
**Showing post:** 57

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [May 28, 2018, 1:48pm UTC](https://discourse.julialang.org/t/how-to-add-metadata-info-to-a-dataframe/11168/57 "2018-05-28T13:48:32Z")

</div>

> [@gcalderone](#):
>
> A macro which automatically does this job, based on the methods returned by `methodswith` would be **really** useful. Do something similar already exists? Or will the core Julia ever support delegation?

Yes, that would be nice, but currently no such thing exists AFAIK.

Note, however, that it wouldn’t magically solve all problems: if you want `getindex` to preserve meta-data, you need to implement custom methods which delegate to the wrapped vector/data frame, and rewrap the result in a `MetadataContainer`. But at least by default all methods would work (and discard meta-data).

---

_[View the full topic](https://discourse.julialang.org/t/how-to-add-metadata-info-to-a-dataframe/11168)._
