Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -272,144 +272,144 @@ def main():
|
|
272 |
count_NP = cause_coun_NP if cause_coun_NP >= effect_coun_NP else effect_coun_NP
|
273 |
else:
|
274 |
count_NP = 0
|
275 |
-
effect_NP_inv = (effect_tab.
|
276 |
if (cause_coun_NP > 0) and (effect_NP_inv > 0):
|
277 |
count_NP_inv = cause_coun_NP if cause_coun_NP >= effect_NP_inv else effect_NP_inv
|
278 |
else:
|
279 |
count_NP_inv = 0
|
280 |
-
effect_NP_cus = (effect_tab.
|
281 |
if (cause_coun_NP > 0) and (effect_NP_cus > 0):
|
282 |
count_NP_cus = cause_coun_NP if cause_coun_NP >= effect_NP_cus else effect_NP_cus
|
283 |
else:
|
284 |
count_NP_cus = 0
|
285 |
-
effect_NP_emp = (effect_tab.
|
286 |
if (cause_coun_NP > 0) and (effect_NP_emp > 0):
|
287 |
count_NP_emp = cause_coun_NP if cause_coun_NP >= effect_NP_emp else effect_NP_emp
|
288 |
else:
|
289 |
count_NP_emp = 0
|
290 |
-
effect_NP_soc = (effect_tab.
|
291 |
if (cause_coun_NP > 0) and (effect_NP_soc > 0):
|
292 |
count_NP_soc = cause_coun_NP if cause_coun_NP >= effect_NP_soc else effect_NP_soc
|
293 |
else:
|
294 |
count_NP_soc = 0
|
295 |
|
296 |
-
cause_coun_inv = (cause_tab.
|
297 |
-
effect_coun_inv = (effect_tab.
|
298 |
if (cause_coun_inv > 0) and (effect_coun_inv > 0):
|
299 |
count_NP_inv = cause_coun_inv if cause_coun_inv >= effect_coun_inv else effect_coun_inv
|
300 |
else:
|
301 |
count_NP_inv = 0
|
302 |
|
303 |
-
effect_inv_inv = (effect_tab.
|
304 |
if (cause_coun_inv > 0) and (effect_inv_inv > 0):
|
305 |
count_inv_inv = cause_coun_inv if cause_coun_inv >= effect_inv_inv else effect_inv_inv
|
306 |
else:
|
307 |
count_inv_inv = 0
|
308 |
-
effect_inv_cus = (effect_tab.
|
309 |
if (cause_coun_inv > 0) and (effect_inv_cus > 0):
|
310 |
count_inv_cus = cause_coun_inv if cause_coun_inv >= effect_inv_cus else effect_inv_cus
|
311 |
else:
|
312 |
count_inv_cus = 0
|
313 |
-
effect_inv_emp = (effect_tab.
|
314 |
if (cause_coun_inv > 0) and (effect_inv_emp > 0):
|
315 |
count_inv_emp = cause_coun_inv if cause_coun_inv >= effect_inv_emp else effect_inv_emp
|
316 |
else:
|
317 |
count_inv_emp = 0
|
318 |
|
319 |
-
effect_inv_soc = (effect_tab.
|
320 |
if (cause_coun_inv > 0) and (effect_inv_soc > 0):
|
321 |
count_inv_soc = cause_coun_inv if cause_coun_inv >= effect_inv_soc else effect_inv_soc
|
322 |
else:
|
323 |
count_inv_soc = 0
|
324 |
|
325 |
-
cause_coun_cus = (cause_tab.
|
326 |
-
effect_coun_cus = (effect_tab.
|
327 |
if (cause_coun_cus > 0) and (effect_coun_cus > 0):
|
328 |
count_NP_cus = cause_coun_cus if cause_coun_cus >= effect_coun_cus else effect_coun_cus
|
329 |
else:
|
330 |
count_NP_cus = 0
|
331 |
|
332 |
-
effect_cus_inv = (effect_tab.
|
333 |
if (cause_coun_cus > 0) and (effect_cus_inv > 0):
|
334 |
count_cus_inv = cause_coun_cus if cause_coun_cus >= effect_cus_inv else effect_cus_inv
|
335 |
else:
|
336 |
count_cus_inv = 0
|
337 |
|
338 |
-
effect_cus_cus = (effect_tab.
|
339 |
if (cause_coun_cus > 0) and (effect_cus_cus > 0):
|
340 |
count_cus_cus = cause_coun_cus if cause_coun_cus >= effect_cus_cus else effect_cus_cus
|
341 |
else:
|
342 |
count_cus_cus = 0
|
343 |
|
344 |
-
effect_cus_emp = (effect_tab.
|
345 |
if (cause_coun_cus > 0) and (effect_cus_emp > 0):
|
346 |
count_cus_emp = cause_coun_cus if cause_coun_cus >= effect_cus_emp else effect_cus_emp
|
347 |
else:
|
348 |
count_cus_emp = 0
|
349 |
|
350 |
-
effect_cus_soc = (effect_tab.
|
351 |
if (cause_coun_cus > 0) and (effect_cus_soc > 0):
|
352 |
count_cus_soc = cause_coun_cus if cause_coun_cus >= effect_cus_soc else effect_cus_soc
|
353 |
else:
|
354 |
count_cus_soc = 0
|
355 |
|
356 |
-
cause_coun_emp = (cause_tab.
|
357 |
-
effect_coun_emp = (effect_tab.
|
358 |
if (cause_coun_emp > 0) and (effect_coun_emp > 0):
|
359 |
count_NP_emp = cause_coun_emp if cause_coun_emp >= effect_coun_emp else effect_coun_emp
|
360 |
else:
|
361 |
count_NP_emp = 0
|
362 |
|
363 |
-
effect_emp_inv = (effect_tab.
|
364 |
if (cause_coun_emp > 0) and (effect_emp_inv > 0):
|
365 |
count_emp_inv = cause_coun_emp if cause_coun_emp >= effect_emp_inv else effect_emp_inv
|
366 |
else:
|
367 |
count_emp_inv = 0
|
368 |
|
369 |
-
effect_emp_cus = (effect_tab.
|
370 |
if (cause_coun_emp > 0) and (effect_emp_cus > 0):
|
371 |
count_emp_cus = cause_coun_emp if cause_coun_emp >= effect_emp_cus else effect_emp_cus
|
372 |
else:
|
373 |
count_emp_cus = 0
|
374 |
|
375 |
-
effect_emp_emp = (effect_tab.
|
376 |
if (cause_coun_emp > 0) and (effect_emp_emp > 0):
|
377 |
count_emp_emp = cause_coun_emp if cause_coun_emp >= effect_emp_emp else effect_emp_emp
|
378 |
else:
|
379 |
count_emp_emp = 0
|
380 |
|
381 |
-
effect_emp_soc = (effect_tab.
|
382 |
if (cause_coun_emp > 0) and (effect_emp_soc > 0):
|
383 |
count_emp_soc = cause_coun_emp if cause_coun_emp >= effect_emp_soc else effect_emp_soc
|
384 |
else:
|
385 |
count_emp_soc = 0
|
386 |
|
387 |
-
cause_coun_soc = (cause_tab.
|
388 |
-
effect_coun_soc = (effect_tab.
|
389 |
if (cause_coun_soc > 0) and (effect_coun_soc > 0):
|
390 |
count_NP_soc = cause_coun_soc if cause_coun_soc >= effect_coun_soc else effect_coun_soc
|
391 |
else:
|
392 |
count_NP_soc = 0
|
393 |
|
394 |
-
effect_soc_inv = (effect_tab.
|
395 |
if (cause_coun_soc > 0) and (effect_soc_inv > 0):
|
396 |
count_soc_inv = cause_coun_soc if cause_coun_soc >= effect_soc_inv else effect_soc_inv
|
397 |
else:
|
398 |
count_soc_inv = 0
|
399 |
|
400 |
-
effect_soc_cus = (effect_tab.
|
401 |
if (cause_coun_soc > 0) and (effect_soc_cus > 0):
|
402 |
count_soc_cus = cause_coun_soc if cause_coun_soc >= effect_soc_cus else effect_soc_cus
|
403 |
else:
|
404 |
count_soc_cus = 0
|
405 |
|
406 |
-
effect_soc_emp = (effect_tab.
|
407 |
if (cause_coun_soc > 0) and (effect_soc_emp > 0):
|
408 |
count_soc_emp = cause_coun_soc if cause_coun_soc >= effect_soc_emp else effect_soc_emp
|
409 |
else:
|
410 |
count_soc_emp = 0
|
411 |
|
412 |
-
effect_soc_soc = (effect_tab.
|
413 |
if (cause_coun_soc > 0) and (effect_soc_soc > 0):
|
414 |
count_soc_soc = cause_coun_soc if cause_coun_soc >= effect_soc_soc else effect_soc_soc
|
415 |
else:
|
|
|
272 |
count_NP = cause_coun_NP if cause_coun_NP >= effect_coun_NP else effect_coun_NP
|
273 |
else:
|
274 |
count_NP = 0
|
275 |
+
effect_NP_inv = (effect_tab.Labellevel2 == 'Investors').sum()
|
276 |
if (cause_coun_NP > 0) and (effect_NP_inv > 0):
|
277 |
count_NP_inv = cause_coun_NP if cause_coun_NP >= effect_NP_inv else effect_NP_inv
|
278 |
else:
|
279 |
count_NP_inv = 0
|
280 |
+
effect_NP_cus = (effect_tab.Labellevel2 == 'Customers').sum()
|
281 |
if (cause_coun_NP > 0) and (effect_NP_cus > 0):
|
282 |
count_NP_cus = cause_coun_NP if cause_coun_NP >= effect_NP_cus else effect_NP_cus
|
283 |
else:
|
284 |
count_NP_cus = 0
|
285 |
+
effect_NP_emp = (effect_tab.Labellevel2 == 'Employees').sum()
|
286 |
if (cause_coun_NP > 0) and (effect_NP_emp > 0):
|
287 |
count_NP_emp = cause_coun_NP if cause_coun_NP >= effect_NP_emp else effect_NP_emp
|
288 |
else:
|
289 |
count_NP_emp = 0
|
290 |
+
effect_NP_soc = (effect_tab.Labellevel2 == 'Society').sum()
|
291 |
if (cause_coun_NP > 0) and (effect_NP_soc > 0):
|
292 |
count_NP_soc = cause_coun_NP if cause_coun_NP >= effect_NP_soc else effect_NP_soc
|
293 |
else:
|
294 |
count_NP_soc = 0
|
295 |
|
296 |
+
cause_coun_inv = (cause_tab.Labellevel2 == 'Investors').sum()
|
297 |
+
effect_coun_inv = (effect_tab.Labellevel2 == 'Non-performance').sum()
|
298 |
if (cause_coun_inv > 0) and (effect_coun_inv > 0):
|
299 |
count_NP_inv = cause_coun_inv if cause_coun_inv >= effect_coun_inv else effect_coun_inv
|
300 |
else:
|
301 |
count_NP_inv = 0
|
302 |
|
303 |
+
effect_inv_inv = (effect_tab.Labellevel2 == 'Investors').sum()
|
304 |
if (cause_coun_inv > 0) and (effect_inv_inv > 0):
|
305 |
count_inv_inv = cause_coun_inv if cause_coun_inv >= effect_inv_inv else effect_inv_inv
|
306 |
else:
|
307 |
count_inv_inv = 0
|
308 |
+
effect_inv_cus = (effect_tab.Labellevel2 == 'Customers').sum()
|
309 |
if (cause_coun_inv > 0) and (effect_inv_cus > 0):
|
310 |
count_inv_cus = cause_coun_inv if cause_coun_inv >= effect_inv_cus else effect_inv_cus
|
311 |
else:
|
312 |
count_inv_cus = 0
|
313 |
+
effect_inv_emp = (effect_tab.Labellevel2 == 'Employees').sum()
|
314 |
if (cause_coun_inv > 0) and (effect_inv_emp > 0):
|
315 |
count_inv_emp = cause_coun_inv if cause_coun_inv >= effect_inv_emp else effect_inv_emp
|
316 |
else:
|
317 |
count_inv_emp = 0
|
318 |
|
319 |
+
effect_inv_soc = (effect_tab.Labellevel2 == 'Society').sum()
|
320 |
if (cause_coun_inv > 0) and (effect_inv_soc > 0):
|
321 |
count_inv_soc = cause_coun_inv if cause_coun_inv >= effect_inv_soc else effect_inv_soc
|
322 |
else:
|
323 |
count_inv_soc = 0
|
324 |
|
325 |
+
cause_coun_cus = (cause_tab.Labellevel2 == 'Customers').sum()
|
326 |
+
effect_coun_cus = (effect_tab.Labellevel2 == 'Non-performance').sum()
|
327 |
if (cause_coun_cus > 0) and (effect_coun_cus > 0):
|
328 |
count_NP_cus = cause_coun_cus if cause_coun_cus >= effect_coun_cus else effect_coun_cus
|
329 |
else:
|
330 |
count_NP_cus = 0
|
331 |
|
332 |
+
effect_cus_inv = (effect_tab.Labellevel2 == 'Investors').sum()
|
333 |
if (cause_coun_cus > 0) and (effect_cus_inv > 0):
|
334 |
count_cus_inv = cause_coun_cus if cause_coun_cus >= effect_cus_inv else effect_cus_inv
|
335 |
else:
|
336 |
count_cus_inv = 0
|
337 |
|
338 |
+
effect_cus_cus = (effect_tab.Labellevel2 == 'Customers').sum()
|
339 |
if (cause_coun_cus > 0) and (effect_cus_cus > 0):
|
340 |
count_cus_cus = cause_coun_cus if cause_coun_cus >= effect_cus_cus else effect_cus_cus
|
341 |
else:
|
342 |
count_cus_cus = 0
|
343 |
|
344 |
+
effect_cus_emp = (effect_tab.Labellevel2 == 'Employees').sum()
|
345 |
if (cause_coun_cus > 0) and (effect_cus_emp > 0):
|
346 |
count_cus_emp = cause_coun_cus if cause_coun_cus >= effect_cus_emp else effect_cus_emp
|
347 |
else:
|
348 |
count_cus_emp = 0
|
349 |
|
350 |
+
effect_cus_soc = (effect_tab.Labellevel2 == 'Society').sum()
|
351 |
if (cause_coun_cus > 0) and (effect_cus_soc > 0):
|
352 |
count_cus_soc = cause_coun_cus if cause_coun_cus >= effect_cus_soc else effect_cus_soc
|
353 |
else:
|
354 |
count_cus_soc = 0
|
355 |
|
356 |
+
cause_coun_emp = (cause_tab.Labellevel2 == 'Employees').sum()
|
357 |
+
effect_coun_emp = (effect_tab.Labellevel2 == 'Non-performance').sum()
|
358 |
if (cause_coun_emp > 0) and (effect_coun_emp > 0):
|
359 |
count_NP_emp = cause_coun_emp if cause_coun_emp >= effect_coun_emp else effect_coun_emp
|
360 |
else:
|
361 |
count_NP_emp = 0
|
362 |
|
363 |
+
effect_emp_inv = (effect_tab.Labellevel2 == 'Investors').sum()
|
364 |
if (cause_coun_emp > 0) and (effect_emp_inv > 0):
|
365 |
count_emp_inv = cause_coun_emp if cause_coun_emp >= effect_emp_inv else effect_emp_inv
|
366 |
else:
|
367 |
count_emp_inv = 0
|
368 |
|
369 |
+
effect_emp_cus = (effect_tab.Labellevel2 == 'Customers').sum()
|
370 |
if (cause_coun_emp > 0) and (effect_emp_cus > 0):
|
371 |
count_emp_cus = cause_coun_emp if cause_coun_emp >= effect_emp_cus else effect_emp_cus
|
372 |
else:
|
373 |
count_emp_cus = 0
|
374 |
|
375 |
+
effect_emp_emp = (effect_tab.Labellevel2 == 'Employees').sum()
|
376 |
if (cause_coun_emp > 0) and (effect_emp_emp > 0):
|
377 |
count_emp_emp = cause_coun_emp if cause_coun_emp >= effect_emp_emp else effect_emp_emp
|
378 |
else:
|
379 |
count_emp_emp = 0
|
380 |
|
381 |
+
effect_emp_soc = (effect_tab.Labellevel2 == 'Society').sum()
|
382 |
if (cause_coun_emp > 0) and (effect_emp_soc > 0):
|
383 |
count_emp_soc = cause_coun_emp if cause_coun_emp >= effect_emp_soc else effect_emp_soc
|
384 |
else:
|
385 |
count_emp_soc = 0
|
386 |
|
387 |
+
cause_coun_soc = (cause_tab.Labellevel2 == 'Society').sum()
|
388 |
+
effect_coun_soc = (effect_tab.Labellevel2 == 'Non-performance').sum()
|
389 |
if (cause_coun_soc > 0) and (effect_coun_soc > 0):
|
390 |
count_NP_soc = cause_coun_soc if cause_coun_soc >= effect_coun_soc else effect_coun_soc
|
391 |
else:
|
392 |
count_NP_soc = 0
|
393 |
|
394 |
+
effect_soc_inv = (effect_tab.Labellevel2 == 'Investors').sum()
|
395 |
if (cause_coun_soc > 0) and (effect_soc_inv > 0):
|
396 |
count_soc_inv = cause_coun_soc if cause_coun_soc >= effect_soc_inv else effect_soc_inv
|
397 |
else:
|
398 |
count_soc_inv = 0
|
399 |
|
400 |
+
effect_soc_cus = (effect_tab.Labellevel2 == 'Customers').sum()
|
401 |
if (cause_coun_soc > 0) and (effect_soc_cus > 0):
|
402 |
count_soc_cus = cause_coun_soc if cause_coun_soc >= effect_soc_cus else effect_soc_cus
|
403 |
else:
|
404 |
count_soc_cus = 0
|
405 |
|
406 |
+
effect_soc_emp = (effect_tab.Labellevel2 == 'Employees').sum()
|
407 |
if (cause_coun_soc > 0) and (effect_soc_emp > 0):
|
408 |
count_soc_emp = cause_coun_soc if cause_coun_soc >= effect_soc_emp else effect_soc_emp
|
409 |
else:
|
410 |
count_soc_emp = 0
|
411 |
|
412 |
+
effect_soc_soc = (effect_tab.Labellevel2 == 'Society').sum()
|
413 |
if (cause_coun_soc > 0) and (effect_soc_soc > 0):
|
414 |
count_soc_soc = cause_coun_soc if cause_coun_soc >= effect_soc_soc else effect_soc_soc
|
415 |
else:
|