pyam
¶
-
genno.compat.pyam.computations.
as_pyam
(scenario, quantity, replace={}, year_time_dim=None, rename={}, collapse: Optional[Callable] = None, drop: Union[Collection[str], str] = 'auto', unit=None)¶ Return a
pyam.IamDataFrame
containing quantity.Warnings are logged if the arguments result in additional, unhandled columns in the resulting data frame that are not part of the IAMC spec.
- Raises
ValueError – If the resulting data frame has duplicate values in the standard IAMC index columns.
pyam.IamDataFrame
cannot handle this data.
See also
-
genno.compat.pyam.computations.
concat
(*args, **kwargs)¶ Concatenate args, which must all be
pyam.IamDataFrame
.
-
genno.compat.pyam.computations.
write_report
(quantity, path)¶ Write the report identified by key to the file at path.
If quantity is a
pyam.IamDataFrame
and path ends with ‘.csv’ or ‘.xlsx’, usepyam
methods to write the file to CSV or Excel format, respectively. Otherwise, equivalent togenno.computations.write_report()
.
-
genno.compat.pyam.util.
clean_units
(df: pandas.core.frame.DataFrame, unit=None) → pandas.core.frame.DataFrame¶ Convert magnitudes and units of df to unit in
str
.- Raises
ValueError – if there is more than one unit.