Skip to content
Advertisement

How to adjust row height with pandas Styler

I have a styled pandas DataFrame that I want to export to HTML with smaller rows than default. I don’t know much about CSS so I haven’t found a way to make it work so far. Can it be achieved and if so, how?

JavaScript

Advertisement

Answer

Set the styles for row and data cell line height and reset the padding

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement