Dataframe was not working

hi my dataframe was not working, any ideas? its shows 3 box with type to search


s

Hi @viswa

Could you provide additional context and the code snippet for reproducing this error.

Thanks!

any kind of dataframe i gave it will show output like this only. if same i gave as st.table it shows the data in the table format
code:
data = {
ā€˜Fruitā€™: [ā€˜Appleā€™, ā€˜Bananaā€™, ā€˜Cherryā€™, ā€˜Dateā€™, ā€˜Elderberryā€™],
ā€˜Quantityā€™: [10, 15, 20, 25, 30],
ā€˜Priceā€™: [0.5, 0.25, 0.75, 1.0, 2.0]
}
df = pd.DataFrame(data)
st.write(ā€œDataframe Formatā€)
st.dataframe(df)
st.write(ā€œTable Formatā€)
st.table(df)

Works fine for me ā€“ could you please share what version of streamlit you are using, and if there are any errors logged when running streamlit?

Yes, it functions properly for everyone else, but it does not work in my system. I was unable to make it right.
My Streamlit Version : Streamlit, version 1.29.0
No, I didnt get any errors logged. i get like this only

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.0.102:8501

The streamlit option menu is not functioning, just like the dataframe. I installed streamlit_option_menu.(pip install streamlit-option-menu)
version: streamlit-option-menu 0.3.6

code:
from streamlit_option_menu import option_menu

with st.sidebar:
selected = option_menu(ā€œMenuā€, ā€œHomeā€, ā€˜Settingsā€™],
icons=[ā€˜houseā€™, ā€˜gearā€™], default_index=0)

if selected == ā€œHomeā€:
st.write(ā€œhomeā€)
else:
st.write(ā€œsettingsā€)

Could you look in your browserā€™s developer tools and load the page and see if there are any errors shown? Here are the instructions for Chrome Chrome DevTools ą¤–ą„‹ą¤²ą„‡ą¤‚  |  Chrome for Developers

Here I attach the screenshot. it shows only warning message, not error message


Sorry, thatā€™s very strange ā€“ Iā€™ve never seen that before. You could try using a different browser, or editing your app in codespaces Develop Streamlit apps in-browser with GitHub Codespaces

I also gave it a try using Opera. Just like this, it displays the same. any firewall or configuration problems?

Could you check the network tab and see if anything was blocked?

no it was not blocked. i checked

[quote=ā€œiamunik, post:13, topic:56916, full:trueā€]
@viswa I also have this issue and I havenā€™t found a solution, I tried downgrading my streamlit version maybe the newer one had a faultā€¦ idkā€¦ but it was the same, I have used every browser I have on my system also it is the showing the same thing. Have you been able to get a solution? I have exhausted every option I have.

No, I also tried many things. For me, st.write(df) [df is Dataframe Name] given like this will work. Just try it

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.