Hey Jervis. I've done something similar in the past, but just wrote the results straight to a CSV file. It might require some minor post-processing in Excel. Hopefully this can be of some use.
Python script:
psspy.report_output(2,r"""results.csv""",[0,0])
psspy.dfax([1,0],r"""subsystem.sub""",r"""monitor.mon""",r"""contingency.con""",r"""dfax.dfx""")
psspy.sensitivity_flows([0,0],[1,0,0,0,0,0,0,0,0],[ 0.5, 0.005],[r"""MY_SUBSYSTEM""","",r"""MY_SUBSYSTEM"""],r"""dfax.dfx""")
subsystem.sub
SUBSYSTEM 'MY_SUBSYSTEM'
AREA 3
END
END
monitor.mon
MONITOR LINES IN SUBSYSTEM MY_SUBSYSTEM
END
END
contingency.con:
END
END