In this tutorial you've learned to:
- calculate the volume below a specific elevation in a DTM
- use QGIS Processing Tools with PyQGIS in QGIS
- use PyQGIS in Python without the QGIS user interface
- create a Stage Volume Curve using PyQGIS and Pandas
There's much more that you can do with PyQGIS besides this example to introduce you to PyQGIS.
A good starting point is Anita Graser's PyQGIS 101: Introduction to QGIS Python programming for non-programmers.Also the tutorials by Ujaval Gandhi are a very useful resource.