Closed JanC closed 2 years ago
ok by digging into the code, I think the way to achieve this is
from pandasgui.store import PandasGuiDataFrameStore
from pandasgui.widgets.dataframe_viewer import DataFrameViewer
...
pgdf = PandasGuiDataFrameStore(df)
df_view = DataFrameViewer(pgdf)
self.groupBox.layout().addWidget(df_view)
it kind of works, however the view seem to have a fixed size
@JanC
Yeah you've got the right idea with that snippet.
it kind of works, however the view seem to have a fixed size
Most of my size-related configuration is in DataFrameExplorer
, if you're directly using DataFrameViewer
you shouldn't have a fixed size. I think the fixed size problem may be related to your own code that isn't shown here? If you try just directly running dataframe_viewer.py (which just creates a DataFrameViewer with some sample data) you should be able to resize it freely with the only minimum sizes being the index width and column header height:
Hi, Is it possible create and use only the DataFrame widget in my own PyQT app?
I'm aware that I can embed the entire PandasUI as explained here using
however, I'm interested only in the data frame view. (which I believe is the
DataFrameViewer
?)It's a bit unclear whether PandasGUI is meant to be used as a standalone app or as a library ..