message_ix
message_ix copied to clipboard
Adapt a common `make_df()` style in Westeros tutorials
In PR https://github.com/iiasa/message_ix/pull/524 @khaeru mentioned, that a common style of creating dataframes could be introduced for further improvements.
In some cases like here,
blackwas applied but the underlying code idiom was left as-is. The code works and it's fine to merge, but I think a later PR could improve these further to suggest a common style, e.g.:name = "soft_activity_up" scen.add_par( name, make_df( name, node_loc=country, technology="wind_ppl", year_act=model_horizon, time="year", value=[0, 0, 0, 0.01], unit="-", ) )or
name = "soft_activity_up" data = make_df( name, node_loc=country, technology="wind_ppl", year_act=model_horizon, time="year", value=[0, 0, 0, 0.01], unit="-", ) scen.add_par(name, data)