Thanks @andfanilo for explaining its usage. Its working now. But, when i use checkbox/selectbox/radio features to filter data to be shown as plots on tool, it reruns entire app.py script and starting from loading data again. Have I overlooked or missed something to include in my code to avoid this kind of problems.
My code is given here:
df_uploaded = st.sidebar.file_uploader(‘Choose txt file:’,type = [‘txt’,‘csv’])
@st.cache(hash_funcs={StringIO: StringIO.getvalue})
def load_data(file_uploaded):
return (pd.read_table(file_uploaded,header=None,encoding=‘utf-8’))
if df_uploaded:
temp = load_data(df_uploaded)
select_cols = st.selectbox('Choose column for analysis', list(temp.columns))
if select_cols:
** code to plot the variable distribution/scatter plot