You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, if df.aggregate_region() (and aggregate()) is called with append=False, a pd.DataFrame is returned with a specific, non-conforming pd.MultiIndex. This should be updated to the following:
kwargs = dict(region=region, variable=variable)
if append is True:
self.append(_data, inplace=True, **kwargs)
else:
return IamDataFrame(_data, **kwargs)
Then, relevant tests will need to be updated to test for the new return type. An example test is provided in #254 in `test_feature_aggregate.py:
# # this test should be updated to the below after the return type of
# # aggregate_region() is updated
# exp = check_aggregate_df.aggregate_region(
# 'Primary Energy', region='foo', append=False
# ).data
# check_aggregate_df.aggregate_region(
# 'Primary Energy', region='foo', append=True
# )
# obs = check_aggregate_df.filter(region='foo').data
# assert len(exp) > 0
# pd.testing.assert_frame_equal(obs.reset_index(drop=True),
# exp.reset_index(drop=True))
The text was updated successfully, but these errors were encountered:
At the moment, if
df.aggregate_region()
(andaggregate()
) is called withappend=False
, apd.DataFrame
is returned with a specific, non-conformingpd.MultiIndex
. This should be updated to the following:Then, relevant tests will need to be updated to test for the new return type. An example test is provided in #254 in `test_feature_aggregate.py:
The text was updated successfully, but these errors were encountered: