3

So i have this script that outputs a pandas dataframe which i can save to a notebook. These tables however arent professional looking and i was wondering if there was a way in pandas/excel writing modules that would allow me to add column headers to my columns , a legend, merge cells, add a title, etc.

This is what i get from python as a pandas dataframe:enter image description here

with this script:

excel_df=pd.DataFrame(closeended_all_counts).T
excel_df.columns=all_columns

writer=pd.ExcelWriter('L:\OMIZ\March_2018.xlsx',engine='xlsxwriter')
excel_df.to_excel(writer,'Final Tables')

workbook = writer.book
worksheet = writer.sheets['Final Tables']
writer.save()

whereas i need this output:

enter image description here

any documentation or modules would be amazing!

1 Answer 1

2

Since you're looking for documentation, here you go:

https://xlsxwriter.readthedocs.io/example_tables.html?highlight=tables

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.