File size: 792 Bytes
d8a4dbe
 
 
84a9829
 
c7a503b
84a9829
 
 
ffa5ef6
 
 
 
 
 
 
 
c7a503b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""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"))