vives commited on
Commit
ecc1fe6
·
1 Parent(s): 4d34d8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -27,11 +27,12 @@ if xl1 is not None :
27
  new_df["dict len"] = new_df["Matched KPs"].apply(lambda x: len(list(x.keys())))
28
  new_df = new_df.sort_values(by="dict len", ascending=False)
29
  new_df.reset_index(inplace=True)
30
- st.write(new_df.shape)
31
  #new_df = new_df.drop("dict len", axis=1)
32
  with st.form("First excel file"):
33
  choices = []
34
  i = 0
 
 
35
  for t1 in new_df.sample(n=num_kp,random_state=42).iterrows():
36
  #for t1 in new_df.sample(n=10, random_state=42).iterrows():
37
  r1 = t1[1]
 
27
  new_df["dict len"] = new_df["Matched KPs"].apply(lambda x: len(list(x.keys())))
28
  new_df = new_df.sort_values(by="dict len", ascending=False)
29
  new_df.reset_index(inplace=True)
 
30
  #new_df = new_df.drop("dict len", axis=1)
31
  with st.form("First excel file"):
32
  choices = []
33
  i = 0
34
+ if new_df.shape[0] > num_kp:
35
+ num_kp = new_df.shape[0]
36
  for t1 in new_df.sample(n=num_kp,random_state=42).iterrows():
37
  #for t1 in new_df.sample(n=10, random_state=42).iterrows():
38
  r1 = t1[1]