Styler.set_table_styles(table_styles) [source]
Set the table styles on a Styler. These are placed in a <style> tag before the generated HTML table.
New in version 0.17.1.
| Parameters: |
table_styles: list Each individual table_style should be a dictionary with |
|---|---|
| Returns: |
self : Styler |
>>> df = pd.DataFrame(np.random.randn(10, 4))
>>> df.style.set_table_styles(
... [{'selector': 'tr:hover',
... 'props': [('background-color', 'yellow')]}]
... )
© 2011–2012 Lambda Foundry, Inc. and PyData Development Team
© 2008–2011 AQR Capital Management, LLC
© 2008–2014 the pandas development team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.19.2/generated/pandas.formats.style.Styler.set_table_styles.html