FWIW, the AstroPy table object (tbl in this case) can write a RST table directly without the need for PypeIt's custom string_table() function.
https://docs.astropy.org/en/latest/api/astropy.io.ascii.RST.html#astropy.io.ascii.RST
For instance, lines 26-35 could be replaced by:
tbl.write(ofile, format="ascii.rst", overwrite=True)
It may be worth it to consider relying on that infrastructure.
Originally posted by @tbowers7 in #2002 (comment)