Closed rgieseke closed 4 years ago
Is this due to SCMDataFrame using Timestamps vs. years in Pyam?
Kind of, it's due to a bug in pyam (hard-coded column name, see https://github.com/IAMconsortium/pyam/blob/25aa7f09fb49ed64569255dd2bf260fb8e62f717/pyam/plotting.py#L243). You'll need something like the below (unless you want to make a PR into pyam which just fixes that line so year
is replaced by self.time_col
)
plt_df = rcp26.filter(year=XXXX).timeseries()
plt_df["year"] = plt_df["time"].apply(lambda x: x.year)
plt_df = plt_df.drop("time", axis="columns")
plt_scm_df = IamDataFrame(plt_df)
plt_scm_df.region_plot()
Closing as we use don't use IamDataFrame
anymore
I tried
and
which failed with