Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -203,16 +203,16 @@ else:
|
|
203 |
print(type(shelters['score']))
|
204 |
st.table(shelters)
|
205 |
|
206 |
-
#
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
|
217 |
# shelters = shelters.sort_values(by='total_score', ascending=False)
|
218 |
# shelters = shelters.head(3)
|
|
|
203 |
print(type(shelters['score']))
|
204 |
st.table(shelters)
|
205 |
|
206 |
+
# calcualte cumulative score
|
207 |
+
total_scores
|
208 |
+
for s in scores:
|
209 |
+
total_scores += shelters[s]
|
210 |
+
print(total_scores, type(total_scores))
|
211 |
+
total_scores = total_scores.tolist()
|
212 |
+
print(total_scores, type(total_scores))
|
213 |
+
total_scores = [s/4 for s in total_scores]
|
214 |
+
print(total_scores, type(total_scores))
|
215 |
+
shelters['total_score'] = total_scores
|
216 |
|
217 |
# shelters = shelters.sort_values(by='total_score', ascending=False)
|
218 |
# shelters = shelters.head(3)
|