Useful pyam functions

pyam.filter_by_meta(data, df, join_meta=False, **kwargs)[source]

Filter by and join meta columns from an IamDataFrame to a pd.DataFrame

Parameters:
  • data (pd.DataFrame instance) – DataFrame to which meta columns are to be joined, index or columns must include [‘model’, ‘scenario’]
  • df (IamDataFrame instance) – IamDataFrame from which meta columns are filtered and joined (optional)
  • join_meta (bool, default False) – join selected columns from df.meta on data
  • kwargs – meta columns to be filtered/joined, where col=… applies filters by the given arguments (using utils.pattern_match()) and col=None joins the column without filtering (setting col to np.nan if (model, scenario) not in df.meta.index)