# Creating multiple histograms from columnar dataset with different conditions

**URL:** <https://root-forum.cern.ch/t/creating-multiple-histograms-from-columnar-dataset-with-different-conditions/51584>\
**Category:** Newbie\
**Tags:** hist, root\
**Created:** [September 15, 2022, 11:44pm UTC](https://root-forum.cern.ch/t/creating-multiple-histograms-from-columnar-dataset-with-different-conditions/51584 "2022-09-15T23:44:20Z")\
**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:** [September 16, 2022, 7:36am UTC](https://root-forum.cern.ch/t/creating-multiple-histograms-from-columnar-dataset-with-different-conditions/51584/2 "2022-09-16T07:36:37Z")

</div>

Hi @PKimPhysics ,

and welcome to the ROOT forum.

See e.g. [this post](https://root-forum.cern.ch/t/looping-over-multiple-root-files-merging-them-and-plotting-a-particular-tree/51502/2) for a C++ example of something similar done with RDataFrame.

RDataFrame’s user guide is [here](https://root.cern/doc/master/classROOT_1_1RDataFrame.html) and there are a number of C++ and Python tutorials available [here](https://root.cern/doc/master/group __tutorial__ dataframe.html).

Basically you want to create a list/vector of RDataFrame results that you fill, in a loop, with several result histograms.

I hope this helps.  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/creating-multiple-histograms-from-columnar-dataset-with-different-conditions/51584)._
