whylogs.core.statistics.counterstracker
¶
Module Contents¶
Classes¶
Class to keep track of the counts of various data types |
- class whylogs.core.statistics.counterstracker.CountersTracker(count=0, true_count=0)¶
Class to keep track of the counts of various data types
- Parameters
count (int, optional) – Current number of objects
true_count (int, optional) – Number of boolean values
null_count (int, optional) – Number of nulls encountered
- increment_count(self)¶
Add one to the count of total objects
- increment_bool(self)¶
Add one to the boolean count
- increment_null(self)¶
Add one to the null count
- merge(self, other)¶
Merge another counter tracker with this one
- Returns
new_tracker – The merged tracker
- Return type
- to_protobuf(self, null_count=0)¶
Return the object serialized as a protobuf message
- static from_protobuf(message: whylogs.proto.Counters)¶
Load from a protobuf message
- Returns
counters
- Return type