src/whylogs/core/columnprofile.py
def to_summary(self):
        """
        Generate a summary of the statistics

        Returns
        -------
        summary : ColumnSummary
            Protobuf summary message.
        """
        schema = None
        if self.schema_tracker is not None:
            schema = self.schema_tracker.to_summary()
        # TODO: implement the real schema/type checking
        opts = dict(
            counters=self.counters.to_protobuf(),
            frequent_items=self.frequent_items.to_summary(),
            unique_count=self.cardinality_tracker.to_summary(_UNIQUE_COUNT_BOUNDS_STD),
        )
        if self.string_tracker is not None and self.string_tracker.count > 0:
            opts["string_summary"] = self.string_tracker.to_summary()
        if self.number_tracker is not None and self.number_tracker.count > 0:
            opts["number_summary"] = self.number_tracker.to_summary()

        if schema is not None:
            opts["schema"] = schema

        return ColumnSummary(**opts)

        Generate a summary of the statistics

        Returns
        -------
        summary : ColumnSummary
            Protobuf summary message.
        
Generate a summary of the statistics
Returns

summary : ColumnSummary
Protobuf summary message.
Generate a summary of the statistics Returns summary : ColumnSummary Protobuf summary message .
def to_summary(self):
        schema = None
        if self.schema_tracker is not None:
            schema = self.schema_tracker.to_summary()
        opts = dict(
            counters=self.counters.to_protobuf(),
            frequent_items=self.frequent_items.to_summary(),
            unique_count=self.cardinality_tracker.to_summary(_UNIQUE_COUNT_BOUNDS_STD),
        )
        if self.string_tracker is not None and self.string_tracker.count > 0:
            opts["string_summary"] = self.string_tracker.to_summary()
        if self.number_tracker is not None and self.number_tracker.count > 0:
            opts["number_summary"] = self.number_tracker.to_summary()
        if schema is not None:
            opts["schema"] = schema
        return ColumnSummary(**opts)
def to_summary ( self ) : schema = None if self . schema_tracker is not None : schema = self . schema_tracker . to_summary ( ) opts = dict ( counters = self . counters . to_protobuf ( ) , frequent_items = self . frequent_items . to_summary ( ) , unique_count = self . cardinality_tracker . to_summary ( _UNIQUE_COUNT_BOUNDS_STD ) , ) if self . string_tracker is not None and self . string_tracker . count > 0 : opts [ "string_summary" ] = self . string_tracker . to_summary ( ) if self . number_tracker is not None and self . number_tracker . count > 0 : opts [ "number_summary" ] = self . number_tracker . to_summary ( ) if schema is not None : opts [ "schema" ] = schema return ColumnSummary ( ** opts )
Generate a summary of the statistics
Returns
Generate a summary of the statistics Returns
"""
        Generate a summary of the statistics

        Returns
        -------
        summary : ColumnSummary
            Protobuf summary message.
        """ # TODO: implement the real schema/type checking
self