-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve output format #75
Comments
tompollard
added a commit
that referenced
this issue
Nov 18, 2019
The # import libraries
from tableone import TableOne
import pandas as pd
# load sample data into a pandas dataframe
url="https://raw.githubusercontent.com/tompollard/tableone/master/data/pn2012_demo.csv"
data=pd.read_csv(url)
table = TableOne(data, label_suffix=True)
print(overall_table.tabulate(tablefmt = "fancygrid")) outputs:
|
It would be good to left align the index columns in the dataframe. See discussion on how to achieve this with styler at: pandas-dev/pandas#39602 Currently the columns are centered when rendered in a notebook, which looks awkward: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current approach relies on pandas to output the table to tex, csv, etc. Add custom approach to improve the output quality.
Consider tabulate:
The text was updated successfully, but these errors were encountered: