Module functions.metatables.weight

Classes

class Weight (name: str, columns: list[str])

Represents a weight in a dataset with metadata information.

This class is designed to store information about different weights used in a dataset.

Attributes

name : str
The name of the weight.
columns : list[str]
List of column names associated with the weight.

Example

weight = Weight( name='weight_name', columns=['column_1', 'column_2'] )

Method generated by attrs for class Weight.

Class variables

var columns : list[str]
var name : str
class WeightDict (*args, **kwargs)

A custom dictionary for storing Weight objects with string keys.

This class is designed to be used within a MetaTable to store information about different weights in a dataset.

Attributes

Inherits from dict.

Methods

setitem(key, value): Overrides the setitem method to enforce that keys must be strings and values must be instances of the Weight class.

Example

weight_dict = WeightDict() weight_dict['weight_name'] = Weight(…)

Ancestors

  • builtins.dict