General functions

pyam.concat(dfs)[source]

Concatenate a series of IamDataFrame-like objects

Parameters
dfslist of IamDataFrames

a list of IamDataFrame instances

pyam.compare(left, right, left_label='left', right_label='right', drop_close=True, **kwargs)[source]

Compare the data in two IamDataFrames and return a pandas.DataFrame

Parameters
left, rightIamDataFrames

two IamDataFrame instances to be compared

left_label, right_labelstr, default left, right

column names of the returned pandas.DataFrame

drop_closebool, optional

remove all data where left and right are close

kwargsarguments for comparison of values

passed to numpy.isclose()

pyam.require_variable(df, variable, unit=None, year=None, exclude_on_fail=False, **kwargs)[source]

Check whether all scenarios have a required variable

Parameters
dfIamDataFrame
argspassed to IamDataFrame.require_variable()
kwargsused for downselecting IamDataFrame

passed to IamDataFrame.filter()

pyam.validate(df, criteria={}, exclude_on_fail=False, **kwargs)[source]

Validate scenarios using criteria on timeseries values

Returns all scenarios which do not match the criteria and prints a log message or returns None if all scenarios match the criteria.

When called with exclude_on_fail=True, scenarios in df not satisfying the criteria will be marked as exclude=True (object modified in place).

Parameters
dfIamDataFrame
argspassed to IamDataFrame.validate()
kwargsused for downselecting IamDataFrame

passed to IamDataFrame.filter()

pyam.categorize(df, name, value, criteria, color=None, marker=None, linestyle=None, **kwargs)[source]

Assign scenarios to a category according to specific criteria or display the category assignment

Parameters
dfIamDataFrame
argspassed to IamDataFrame.categorize()
kwargsused for downselecting IamDataFrame

passed to IamDataFrame.filter()

pyam.check_aggregate(df, variable, components=None, exclude_on_fail=False, multiplier=1, **kwargs)[source]

Check whether the timeseries values match the aggregation of sub-categories

Parameters
dfIamDataFrame
argspassed to IamDataFrame.check_aggregate()
kwargsused for downselecting IamDataFrame

passed to IamDataFrame.filter()