I am looking for a solution to display a table in a window (separate from the console). I am using Ubuntu 22.04 system.
The data are processed by pandas.
I found this guide: https://www.delftstack.com/fr/howto/python-pandas/pandas-display-dataframe-in-a-table-style/
that the Styler
object may display a table from a DataFrame.
Thus, I tried this:
Inside the code, there is a 2D list called "week"
. I would like to display it:
df = pd.DataFrame(week)
df.style
print(df)
But, nothing new happens after doing df.style
. However, print(df)
works fine.
3
Answers
Have you tried using a Jupyter notebook? It’s useful for separate charts visualizations, so you could display your pd.DataFrame() in different cells, I’m assuming that is what you mean by display a dataframe in separate windows.
Use this
This approach provides a simple and effective way to visualize your DataFrame data outside the console on Ubuntu (or any other system that supports Tkinter).
Any IDE can do it by default or with extensions, eg. VS Code, PyCharm, DataSpell…
With VSC you can use default Data Viever other extensions eg. Data Wrangler (that uses venv with pandas)