def _show_table(self, tab, title): cframe = GridFrame(self) grid = cframe.grid grid.set_data(tab) if not title is None: grid.table.name = title cframe.Bind(wx.EVT_ACTIVATE, self.on_new_tab) cframe.Bind(wx.EVT_CLOSE, self.on_close_tab) cframe.Show()
def table_obj_test(): df = pd.DataFrame(np.random.randn(100, 5)) table = Table() table.data = df table.name = 'Table Object' table.set_style(1, tc=(255, 0, 0), round=5) table.set_style(2, lc=(255, 0, 255), ln='both') cf = GridFrame(None) cf.set_data(table) cf.Show()
def _show_table(self, tab, title): cframe = GridFrame(self) grid = cframe.grid if not isinstance(tab, Table): tab = Table(tab, title) App.show_table(self, tab, tab.title) grid.set_data(tab) cframe.Bind(wx.EVT_ACTIVATE, self.on_active_table) cframe.Bind(wx.EVT_CLOSE, self.on_close_table) cframe.SetIcon(self.GetIcon()) cframe.Show()
def grid_frame_test(): df = pd.DataFrame(np.random.randn(100, 5)) cf = GridFrame(None) cf.set_data(df) cf.Show()