Skip to content

Instantly share code, notes, and snippets.

@aurora1625
Created December 2, 2020 03:59
Show Gist options
  • Save aurora1625/7ff7a6bd84f26e06d708073033c66ce5 to your computer and use it in GitHub Desktop.
Save aurora1625/7ff7a6bd84f26e06d708073033c66ce5 to your computer and use it in GitHub Desktop.
tabulate #pandas #tabulate
from tabulate import tabulate
print(tabulate(df, tablefmt="plain"))
'''
Supported table formats are:
"plain"
"simple"
"github"
"grid"
"fancy_grid"
"pipe"
"orgtbl"
"jira"
"presto"
"pretty"
"psql"
"rst"
"mediawiki"
"moinmoin"
"youtrack"
"html"
"latex"
"latex_raw"
"latex_booktabs"
"textile"
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment