sneves commited on
Commit
d1013d8
·
verified ·
1 Parent(s): 37c1491

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -18,7 +18,9 @@ with st.sidebar:
18
 
19
  year_list = list(df.Year.unique())[::-1]
20
  year_list = sorted(year_list)
21
-
 
 
22
  selected_year = st.selectbox('Select a year', year_list, index=len(year_list)-1)
23
 
24
  cik_list = list(df.CIK.unique())[::-1]
@@ -43,12 +45,12 @@ with col1:
43
  st.pyplot(plt)
44
 
45
  with col2:
46
- st.markdown('### ESG Word Clouds')
47
 
48
  wc_list = ['E_Text', 'S_Text', 'G_Text']
49
 
50
  for x in wc_list:
51
- row = df_selected_cik.loc[selected_year.astype(str)]
52
  text = row.loc[x]
53
  text = re.sub(r'[^A-Za-z\s]', '', text)
54
  text = text.lower()
 
18
 
19
  year_list = list(df.Year.unique())[::-1]
20
  year_list = sorted(year_list)
21
+
22
+ #need a default string for year
23
+ selected_year = '2025'
24
  selected_year = st.selectbox('Select a year', year_list, index=len(year_list)-1)
25
 
26
  cik_list = list(df.CIK.unique())[::-1]
 
45
  st.pyplot(plt)
46
 
47
  with col2:
48
+ st.markdown('#### ESG Word Clouds')
49
 
50
  wc_list = ['E_Text', 'S_Text', 'G_Text']
51
 
52
  for x in wc_list:
53
+ row = df_selected_cik.loc[selected_year]
54
  text = row.loc[x]
55
  text = re.sub(r'[^A-Za-z\s]', '', text)
56
  text = text.lower()