# Unknown columns while drawing TH2D using RDataFrame

**URL:** <https://root-forum.cern.ch/t/unknown-columns-while-drawing-th2d-using-rdataframe/34793>\
**Category:** ROOT\
**Tags:** rdataframe\
**Created:** [June 24, 2019, 4:55pm UTC](https://root-forum.cern.ch/t/unknown-columns-while-drawing-th2d-using-rdataframe/34793 "2019-06-24T16:55:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [June 27, 2019, 12:16pm UTC](https://root-forum.cern.ch/t/unknown-columns-while-drawing-th2d-using-rdataframe/34793/4 "2019-06-27T12:16:19Z")

</div>

Hi,  
see the discussion [here](https://root-forum.cern.ch/t/rdataframe-syntax-more-like-ttree-draw/31778/2).

With current RDF, `df.Histo1D("vec[0]")` is written `df.Define("vec0", "vec[0]").Histo1D("vec0")`.

The reason you can write `"vec[0]"` in `Filter` and `Define` is that they take an _expression_ as argument (either as a string or as a C++ callable), while `Histo1D` just takes column names. It is in principle possible to add a `df.Histo1D("vec[0]")` shortcut (PRs are welcome 😃 ) but as I discuss in the discussion linked above it’s not completely trivial.

Cheers,  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/unknown-columns-while-drawing-th2d-using-rdataframe/34793)._
