# Histogram RVec branch in RDataFrame

**URL:** <https://root-forum.cern.ch/t/histogram-rvec-branch-in-rdataframe/49342>\
**Category:** Newbie\
**Tags:** rdataframe\
**Created:** [March 24, 2022, 2:23pm UTC](https://root-forum.cern.ch/t/histogram-rvec-branch-in-rdataframe/49342 "2022-03-24T14:23:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [March 24, 2022, 2:39pm UTC](https://root-forum.cern.ch/t/histogram-rvec-branch-in-rdataframe/49342/2 "2022-03-24T14:39:56Z")

</div>

Hi @certley ,  
and welcome to the ROOT forum!

Allowing expressions in place of column names could be done; on one hand it would save typing for users, on the other it would encourage some not-so-nice usage patterns and complicate internals. See also my reply here: [Create Histogram of composite variable in RDataframe - #2 by eguiraud](https://root-forum.cern.ch/t/create-histogram-of-composite-variable-in-rdataframe/47365/2) .

I have been thinking about it and a possible middle ground would be:

```python
df.Histo1D(ROOT.RDF.ColExpr('px[0]'))

```

but I don’t know if it’s worth it 😅  
Cheers,  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/histogram-rvec-branch-in-rdataframe/49342)._
