openclean.profiling.tests module

Helper class for testing profiling functionality.

class openclean.profiling.tests.ValueCounter

Bases: openclean.profiling.base.DataStreamProfiler

Test profiler that collects the values and counts that are passed to it in a Counter.

close() collections.Counter

Return the counter at the end of the stream.

Return type

collections.Counter

consume(value: Union[int, float, str, datetime.datetime], count: int)

Add value and count to the internal counter.

Parameters
  • value (scalar) – Scalar column value from a dataset that is part of the data stream that is being profiled.

  • count (int) – Frequency of the value. Note that this count only relates to the given value and does not necessarily represent the total number of occurrences of the value in the stream.

open()

Initialize an empty counter at the beginning of the stream.