vives's picture
Update app.py
ffa5ef6
raw
history blame
792 Bytes
"""The following program will read in 2 XL sheets of KP matches and the user will evaluate the quality of the matching"""
import streamlit as st
import pandas as pd
xl1 = st.file_uploader("Choose first file", key="xl1")
xl2 = st.file_uploader("Choose second file", key="xl2")
if xl1 is not None and xl2 is not None:
#assert that the first few columns are the same
df1 = pd.read_excel(xl1, sheet_name= "0.85 Threshold")
df2 = pd.read_excel(xl2, sheet_name= "0.85 Threshold")
try:
pandas.testing.assert_frame_equal(df1[["Attendee A","Attendee B","KP"]], df1[["Attendee A","Attendee B","KP"]])
except AssertionError as e:
st.write("The files' attendees and KPs don't match!")
xl1 = None
xl2 = None
break
st.write(pd.read_excel(xl1, sheet_name= "0.85 Threshold"))