I’m trying to show a dataframe (all columns have the same dimension). At jupyter notebook works fine as expected, but when i upload my code to my app at streamlit, shows the following error:
The dataframe at jupyter notebook:
I’m trying to show a dataframe (all columns have the same dimension). At jupyter notebook works fine as expected, but when i upload my code to my app at streamlit, shows the following error:
The dataframe at jupyter notebook:
Problem solved. I needed to put my data into a dictionary then convert to a dataframe, this being oriented by the index, by the end transpose my dataframe.
e.g:
data = {'a':data_a,'b':data_b,'x_mean':data_x_media,'f(x_mean)':data_f_x_media}
df = pd.DataFrame.from_dict(data, orient='index') # Transformação do dicionário em um dataframe
df = bissec_df.transpose()
st.write(df)
st.write("Root is: {}".format(x_mean))