target display
Browse files- appStore/target.py +5 -2
appStore/target.py
CHANGED
@@ -44,7 +44,7 @@ def to_excel(df,hits):
|
|
44 |
output = BytesIO()
|
45 |
writer = pd.ExcelWriter(output, engine='xlsxwriter')
|
46 |
df.to_excel(writer, index=False, sheet_name='rawdata')
|
47 |
-
hits = hits.drop(columns = ['Target Score','Netzero Score','GHG Score'])
|
48 |
hits.to_excel(writer,index=False,sheet_name = 'Target')
|
49 |
workbook = writer.book
|
50 |
# worksheet = writer.sheets['Sheet1']
|
@@ -109,6 +109,9 @@ def target_display():
|
|
109 |
st.write('**GHG Target Related Paragraphs**: `{}`'.format(count_ghg))
|
110 |
st.write('**Transport Related Paragraphs**: `{}`'.format(count_transport))
|
111 |
# st.write('-------------------')
|
|
|
|
|
|
|
112 |
hits = hits.sort_values(by=['Target Score'], ascending=False)
|
113 |
hits = hits.reset_index(drop=True)
|
114 |
|
@@ -179,7 +182,7 @@ def filter_dataframe(df: pd.DataFrame) -> pd.DataFrame:
|
|
179 |
|
180 |
|
181 |
df = df.copy()
|
182 |
-
|
183 |
|
184 |
# Try to convert datetimes into a standard format (datetime, no timezone)
|
185 |
# for col in df.columns:
|
|
|
44 |
output = BytesIO()
|
45 |
writer = pd.ExcelWriter(output, engine='xlsxwriter')
|
46 |
df.to_excel(writer, index=False, sheet_name='rawdata')
|
47 |
+
# hits = hits.drop(columns = ['Target Score','Netzero Score','GHG Score'])
|
48 |
hits.to_excel(writer,index=False,sheet_name = 'Target')
|
49 |
workbook = writer.book
|
50 |
# worksheet = writer.sheets['Sheet1']
|
|
|
109 |
st.write('**GHG Target Related Paragraphs**: `{}`'.format(count_ghg))
|
110 |
st.write('**Transport Related Paragraphs**: `{}`'.format(count_transport))
|
111 |
# st.write('-------------------')
|
112 |
+
hits.drop(columns=['Target Label','Netzero Score','GHG Score','Action Label',
|
113 |
+
'Action Score','Policies_Plans Label',
|
114 |
+
'Policies_Plans Score','Conditional Score'])
|
115 |
hits = hits.sort_values(by=['Target Score'], ascending=False)
|
116 |
hits = hits.reset_index(drop=True)
|
117 |
|
|
|
182 |
|
183 |
|
184 |
df = df.copy()
|
185 |
+
df = df.drop(columns = ['Target '])
|
186 |
|
187 |
# Try to convert datetimes into a standard format (datetime, no timezone)
|
188 |
# for col in df.columns:
|