Re: PyGridTableBase
Robin Dunn <[email protected]>
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
Tom B wrote: > Posted this to the user forum but now think a wxpython developer might > have better insight as there were zero replies, but lots of views.. > > Does anyone know of examples where gridlib.PyGridTableBase is specialized > to wrap a pandas dataframe object. Have you seen this one? https://gist.github.com/szs8/3669688 > The dataframe brings in a lot of functionality, such as sorting. I've > taken several examples and modified to use a wrapped > dataframe, but the sort never works. The dataframe does get > sorted but the grid display is never updated. > Attached is an example where the CVSData source works (commented out), > and while PandasDataSource > sorts the dataframe, the display not updated. > > The CVXData version represents the table as a list of lists. Somewhere > in the class structure there is an assumption that the table has to be > a [[]], and not column data, even though you can override API's for > accessing elements of the table?. Or could it be I'm not overriding > the needed functions ? > For the sorting issue, I wonder if it's just a matter of getting the grid to refetch the visible values from the table? When the sorting is done I would try sending a GridTableMessage with an id of GRIDTABLE_REQUEST_VIEW_GET_VALUES. -- Robin Dunn Software Craftsman http://wxPython.org -- You received this message because you are subscribed to the Google Groups "wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.