chemicalchecker.util.aggregate.aggregate.AggregateAsMatrix

class AggregateAsMatrix(method)[source]

Bases: object

AggregateAsMatrix class.

Given a matrix with keys with potential duplicates, aggregate them.

Initialize a AggregateAsMatrix instance.

Parameters:

method (str) – The aggregation method to be used. Must be one of: -first: The first occurrence of the signature is kept. -last: The last occurrence of the signature is kept. -average: The average of the signature is kept.

Methods

get_agg_func

Get aggregation function.

get_agg_func()[source]

Get aggregation function.