warframe_metrics.utils.schema.Stat.merge¶
- Stat.merge(other, newer=True)¶
Merge two Stat object togther based on dates.
Combine two Stat objecst using the dates replaced to be only year, month, and day. These replaced dates are then used to merge the two stat objects. The idea is to combined new collected data with old stored data. This merge is done in-place and does not return a new Stat object. Please note that this function is not highly optimized and expects one statistics to be collected each days. The live statistics are simply set to the newer Stat object chosen based on the newer parameter.
- Parameters
other (
Stat) – The Stat to merge with.newer (
bool) – A boolean representing whether the parameter other represents a newer Stat object or an older one. The newer Stat object’s values are taken when there are overlapping dates.
- Raises
ValueError – If the Stat objects have different item names.
- Return type
None