Table with Labels and Variables

Hello Streamlit Community!

I’m looking for an option where I can create a simple table to display values extracted from either a JSON file using requests or pandas.

My work-around is creating multiple columns and rows using beta_columns() but it does not look too good.

Is there any other option to display these values?

Thank you so much!

Hi, you can do like this to show your table data on web page:

1.pip install streamlit-aggrid
2.add the code to your program:

from st_aggrid import Agrid
import pandas as pd

df=pd.read_csv(“example.csv”)
Agrid(df, height=500, width=‘100%’, fit_columns_on_grid_load=True)

  1. open cmd window, run the command line:
    streamlit run yourpythonprojectname.py

In this way, your table data will can be seen on web page.

Thanks for your reply @BeyondMyself!
In this case, the data I need to display in the table is not a Data Frame but a bunch of loose variables across multiple data cells and other calculations.

@elcade
create a dictory to save your data

from st_aggrid import Agrid
import pandas as pd

dict={‘Vitual Machine’:[‘67’],vCPUs per VM:[‘6.72’],…}

df=pd.DataFrame(dict)
Agrid(df, height=500, width=‘100%’, fit_columns_on_grid_load=True)

try this solution.

Roadblock, I’m running Python 3.9 and there is an issue with Streamlit Components and pyarrow when installed with pip.

I’ll keep looking!