kwargs can be additional filters (for example apply only where variable='Temperature' or region='World')
method can be min, max, mean, median, and maybe even other pyam functions like pyam.timeseries.cross_threshold() or cumulative()
column would be what to set as meta - the actual value (default) or the year/region/... column where the value is reached (e.g., year of peak temperature)
name is the column name in meta (similar to the use in df.set_meta())
So the use case suggested by @znicholls for setting the peak temperature (see #237) could be implemented as
It would be useful to have a generic
df.set_meta_from_data()
function, e.g.,where
kwargs
can be additional filters (for example apply only wherevariable='Temperature'
orregion='World'
)method
can be min, max, mean, median, and maybe even otherpyam
functions likepyam.timeseries.cross_threshold()
orcumulative()
column
would be what to set as meta - the actualvalue
(default) or theyear
/region
/... column where the value is reached (e.g., year of peak temperature)name
is the column name inmeta
(similar to the use indf.set_meta()
)So the use case suggested by @znicholls for setting the peak temperature (see #237) could be implemented as