-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pandas FutureWarning in westeros_historical_new_capacity.ipynb #899
Comments
I'm not sure I agree on the grid_eff = float(
scenario.par(
"output",
filters={
"year_vtg": scenario.firstmodelyear,
"year_act": scenario.firstmodelyear,
"technology": "grid",
},
)["value"].iloc[0]
)
print(f"Grid efficiency is {grid_eff}.")
demand_of_firstmodelyear /= grid_eff I see this output: Grid efficiency is 0.9. Which is exactly what we said in the |
When I run:
I get that the When looking at the westeros_baseline from the official repo we have that:
We are setting the |
What is this about?
Deprecated method in Pandas
In the tutorial hystorical_new_capacity we use the command
df["value"] = float(df[df["year"] == 700]["value"])
modify the demand.The problem is that this will throw a warning because it will be deprecated in future version of Pandas:
I suggest to replace the above line with either a lengthy:
or a more compact:
df["value"] = df.loc[df["year"] == 700, "value"].iloc[0]
since the values in the column are already numpy.float64 it should not be a problem. If for some reason we really need to make sure that it is a float we could always use
df["value"] = df["year"].apply(float)
Grid Efficiency value
In this exercise we need to retrieve the grid_efficiency value so that we can calculate how much coal_ppl capacity we need. The following is used:
This will give 1 as a result because the output of the grid is 1.
I think we are looking for the input which is 1.111111_ in which case the correct code would be:
The text was updated successfully, but these errors were encountered: