In passing, I note that we can easily generate simple markdown style table output from a pandas data frame using the pandas .to_markdown()
dataframe method:
Here’s the associated code fragment:
data = """colA, colB, colC
this, that, 1
or, another, 2"""
import pandas as pd
from io import StringIO
df = pd.read_csv(StringIO(data))
md_table = df.to_markdown(index=False)
print(md_table)
I also note that Stack Overflow recently (ish!) added support for markdown tables (announcement) using Github-flavoured markdown syntax.