I'm trying to apply one or more styles to a pandas
Dataframe, but I can't get to display the applied style in a pandastable
Table. Here's an example:
from tkinter import *
from pandastable import Table, TableModel
class TestApp(Frame):
def __init__(self, parent=None):
self.parent = parent
Frame.__init__(self)
self.main = self.master
self.main.geometry('600x400+200+100')
self.main.title('Table app')
f = Frame(self.main)
f.pack(fill=BOTH,expand=1)
df = TableModel.getSampleData()
df.style.highlight_max(color='lightgreen') #HERE'S THE STYLE I WANT TO APPLY
pt = Table(f, dataframe=df, showtoolbar=True, showstatusbar=True)
pt.show()
return
app = TestApp()
app.mainloop()
This will display the usual Table with no styles applied.
Does pandastable process the html/css style created by the pandas Styler or is there any way to apply styles to a pandastable Table object?
Any suggestions would be appreciated.