Formatting Python Notebook-generated table headers

So, referencing this post I was able to find some helpful docs on styling DataFrame tables:

http://pandas.pydata.org/pandas-docs/stable/style.html

https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_html.html

However, neither one of those was able to help me with styling the table headers, which, look super gross :)

I am looking for a way to format the output table so that there is some amount of padding between header cells, changing the font, making them bold, etc. Any ideas? Thank you!

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Robby ! I know you've reached out via chat, but wanted to follow up here as well.

    It seems like pandas doesn't provide native support for header styling. That said, you can definitely use a python library like plotly to dress your headers up! Check out this example report that takes a pandas dataframe and passes it to plotly for header styling. For more general dataframe styling, check out this gallery for more examples and inspiration.

    Reply Like 1
  • Nate Festinger Yup! Ha, I made this post six months ago, and I have since found a few other options. Thanks!

    Reply Like
Like Follow
  • Status Answered
  • 2 mths agoLast active
  • 2Replies
  • 470Views
  • 2 Following

Create A New Discussion

Share your thoughts