metricq / metricq-python

🐍 The MetricQ Python interface
https://metricq.github.io/metricq-python/
BSD 3-Clause "New" or "Revised" License
18 stars 7 forks source link

Pandas division by zero #186

Open tilsche opened 1 year ago

tilsche commented 1 year ago

When the PandasHistoryClient creates aggregate timelines, any interval with count=0 will lead to a division by zero in mean_sum (and probably in interval_sum as well anyway). We probably want NaN there.

I'm not sure whether to fix this in the dataframe generation or in the TimeAggregate properties.