characterize(factors, characterized_name_column='impact', characterization_factors_column='factor', characterized_unit_column='impact_unit', name=None, return_char_matrix=False, _meta=None)¶
Characterizes the extension with the characterization factors given in factors. Factors can contain more characterization factors which depend on stressors not present in the Extension - these will be automatically removed.
Accordance of units is not checked - you must ensure that the characterization factors correspond to the units of the extension to be characterized.
- factors (pd.DataFrame) – A dataframe in long format with numerical index and columns named index.names of the extension to be characterized and ‘characterized_name_column’, ‘characterization_factors_column’, ‘characterized_unit_column’
- characterized_name_column (str (optional)) – Name of the column with the names of the characterized account (default: “impact”)
- characterization_factors_column (str (optional)) – Name of the column with the factors for the characterization (default: “factor”)
- characterized_unit_column (str (optional)) – Name of the column with the units of the characterized accounts characterization (default: “impact_unit”)
- name (string (optional)) – The new name for the extension, if None (default): name of the current extension with suffix ‘_characterized’
- return_char_matrix (boolean (optional)) – If False (default), returns just the characterized extension. If True, returns a namedtuple with extension and the actually used characterization matrix.
- _meta (MRIOMetaData, optional) – Metadata handler for logging, optional. Internal
- pymrio.Extensions or
- namedtuple with (extension (pymrio.Extension, factors: pd.DataFrame))
- depending on return_char_matrix. Only the factors used for the calculation
- are returned.