binning.create_histogram_table "magically" uses a "weight" column if it finds it. This is undocumented and not at all obvious. It would be better to add another parameterweight_key="weight" and mention in the docs that the histogram will be weighted by the column specified byweight_key.
The docstring also doesn't mention that it outputs more than just the histogram, but both the normal and weighted version. And even more unexpected, if it finds a particle_type column, it makes grouped histograms by particle type that also end up in the output. It would be better (and more clear) to add this also as a parameter group_key="particle_type" to make it more obvious
binning.create_histogram_table"magically" uses a "weight" column if it finds it. This is undocumented and not at all obvious. It would be better to add another parameterweight_key="weight"and mention in the docs that the histogram will be weighted by the column specified byweight_key.The docstring also doesn't mention that it outputs more than just the histogram, but both the normal and weighted version. And even more unexpected, if it finds a
particle_typecolumn, it makes grouped histograms by particle type that also end up in the output. It would be better (and more clear) to add this also as a parametergroup_key="particle_type"to make it more obvious