A project plan usually carries two different levels of information at once: the phases, and the tasks inside each phase along with their owners and durations. Flattened into one list, the reader has to work out the hierarchy while scanning; in a status meeting, it is far more useful to show the phases first and expand a phase only when its tasks matter. Excel's outline feature exists for exactly this: grouped rows get a plus/minus control in the margin, level buttons labeled 1, 2, 3 appear above the row headers, and one click collapses or expands a block.
Doing it by hand means selecting rows and clicking Data → Group for every level, which is easy to get wrong once the nesting deepens and has to be redone for every new file. Python lets the structure live in code so it can be applied to any report with the same shape.…