Closed fhg-isi closed 4 months ago
[x ] I have confirmed this bug exists on the lastest release of PyPSA.
[ ] I have confirmed this bug exists on the current master branch of PyPSA.
master
I tried to follow doc at https://pypsa.readthedocs.io/en/latest/examples/statistics.html
and get errors for
curtailment = statistics.curtailment()
=>
AttributeError: 'DataFrame' object has no attribute 'curtailment'. Did you mean: 'Curtailment'?
curtailment = statistics.Curtailment()
cur = statistics.Curtailment() ^^^^^^^^^^^^^^^^^^^ TypeError: 'Series' object is not callable
=> Please update getting started and API documentation.
https://pypsa.readthedocs.io/en/latest/api_reference.html#module-pypsa.statistics
statistics.columns
gives me
Index(['Optimal Capacity', 'Installed Capacity', 'Supply', 'Withdrawal', 'Dispatch', 'Transmission', 'Capacity Factor', 'Curtailment', 'Capital Expenditure', 'Operational Expenditure', 'Revenue', 'Market Value'], dtype='object')
According to doc on dispatch:
Deprecated since version 0.28: This will be removed in 0.29. Use ‘energy_balance’ instead.
=> Should I still use deprecated 'Dispatch' ? Or energy_balance? How to access energy_balance in version 0.28?
No response
My error.
One needs to use statistics without (): n.statistics.curtailment() instead of n.statistics().curtailment()
n.statistics.curtailment()
n.statistics().curtailment()
Version Checks (indicate both or one)
[x ] I have confirmed this bug exists on the lastest release of PyPSA.
[ ] I have confirmed this bug exists on the current
master
branch of PyPSA.Issue Description
I tried to follow doc at https://pypsa.readthedocs.io/en/latest/examples/statistics.html
and get errors for
curtailment = statistics.curtailment()
=>
AttributeError: 'DataFrame' object has no attribute 'curtailment'. Did you mean: 'Curtailment'?
curtailment = statistics.Curtailment()
=>
=> Please update getting started and API documentation.
https://pypsa.readthedocs.io/en/latest/api_reference.html#module-pypsa.statistics
statistics.columns
gives me
According to doc on dispatch:
Deprecated since version 0.28: This will be removed in 0.29. Use ‘energy_balance’ instead.
=> Should I still use deprecated 'Dispatch' ? Or energy_balance? How to access energy_balance in version 0.28?
Reproducible Example
No response
Expected Behavior
No response
Installed Versions