Hiya, I’m trying to plot a line graph using two specific columns (x-axis: data from column 5 and y-axis: data from column 8) from my data frame, but am unsure of how to do this. I would be really grateful to have some assistance with this!
This is my code so far:
import streamlit as st
import pandas as pd
#configuration
st.set_option('deprecation.showfileUploaderEncoding', False)
st.title("Student Feedback Visualisation App")
# Add sidebar
st.sidebar.subheader("Visualisation settings")
# Setup file upload
uploaded_file = st.sidebar.file_uploader(label="Upload your Excel file", type = ['csv','xlsx'])
global df
if uploaded_file is not None:
print(uploaded_file)
try:
df = pd.read_csv(uploaded_file)
except Exception as e:
print(e)
df = pd.read_excel(uploaded_file)
try:
if st.checkbox('Show raw data'):
st.subheader('Raw data')
st.write(df)
except Exception as e:
print(e)
st.write("Please upload a file to the application by going to the sidebar")