drguilhermeapolinario commited on
Commit
cbacdee
·
verified ·
1 Parent(s): dd4bb6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -15
app.py CHANGED
@@ -16,7 +16,7 @@ from streamlit_extras.stylable_container import stylable_container
16
  from streamlit_folium import folium_static
17
  from streamlit_option_menu import option_menu
18
 
19
- from data_cleaning import criar_dataframe, iniciar, limpa_rci1, limpa_rci2, separa_grupos, renomear_escola, limpar_dfs, processar_arquivo
20
 
21
  st.set_page_config(
22
  page_title="Dashboard UBS Flamengo",
@@ -73,31 +73,35 @@ def gerar_resumo_df():
73
  """
74
  resumo = ""
75
 
76
- if "DF_HEAD" in locals() or "DF_HEAD" in globals():
 
 
 
 
77
  resumo += "Resumo DF_HEAD:\n"
78
  resumo += DF_HEAD.to_string(index=False) + "\n\n"
79
 
80
- if "DF_IDADE" in locals() or "DF_IDADE" in globals():
81
  resumo += "Resumo DF_IDADE:\n"
82
  resumo += DF_IDADE.to_string(index=False) + "\n\n"
83
 
84
- if "DF_GENERO" in locals() or "DF_GENERO" in globals():
85
- resumo += f"Resumo DF_GENERO:\n{DF_GENERO.value_counts().to_string()}\n\n"
86
 
87
- if "DF_COR" in locals() or "DF_COR" in globals():
88
- resumo += f"Resumo DF_COR:\n{DF_COR.value_counts().to_string()}\n\n"
89
 
90
- if "DF_DEFICIENCIA" in locals() or "DF_DEFICIENCIA" in globals():
91
- resumo += f"Resumo DF_DEFICIENCIA:\n{DF_DEFICIENCIA.value_counts().to_string()}\n\n"
92
 
93
- if "DF_DOENCAS" in locals() or "DF_DOENCAS" in globals():
94
- resumo += f"Resumo DF_DOENCAS:\n{DF_DOENCAS.value_counts().to_string()}\n\n"
95
 
96
- if "DF_ESCOLA" in locals() or "DF_ESCOLA" in globals():
97
- resumo += f"Resumo DF_ESCOLA:\n{DF_ESCOLA.value_counts().to_string()}\n\n"
98
 
99
- if "DF_TRANSGEN" in locals() or "DF_TRANSGEN" in globals():
100
- resumo += f"Resumo DF_TRANSGEN:\n{DF_TRANSGEN.value_counts().to_string()}\n\n"
101
 
102
  return resumo
103
 
 
16
  from streamlit_folium import folium_static
17
  from streamlit_option_menu import option_menu
18
 
19
+ from data_cleaning import processar_arquivo
20
 
21
  st.set_page_config(
22
  page_title="Dashboard UBS Flamengo",
 
73
  """
74
  resumo = ""
75
 
76
+ if DF_DATA is not None:
77
+ resumo += "Resumo DF_DATA:\n"
78
+ resumo += DF_DATA.to_string(index=False) + "\n\n"
79
+
80
+ if DF_HEAD is not None:
81
  resumo += "Resumo DF_HEAD:\n"
82
  resumo += DF_HEAD.to_string(index=False) + "\n\n"
83
 
84
+ if DF_IDADE is not None:
85
  resumo += "Resumo DF_IDADE:\n"
86
  resumo += DF_IDADE.to_string(index=False) + "\n\n"
87
 
88
+ if DF_GENERO is not None:
89
+ resumo += f"Resumo DF_GENERO:\n{DF_GENERO.to_string(index=False)}\n\n"
90
 
91
+ if DF_COR is not None:
92
+ resumo += f"Resumo DF_COR:\n{DF_COR.to_string(index=False)}\n\n"
93
 
94
+ if DF_DEFICIENCIA is not None:
95
+ resumo += f"Resumo DF_DEFICIENCIA:\n{DF_DEFICIENCIA.to_string(index=False)}\n\n"
96
 
97
+ if DF_DOENCAS is not None:
98
+ resumo += f"Resumo DF_DOENCAS:\n{DF_DOENCAS.to_string(index=False)}\n\n"
99
 
100
+ if DF_ESCOLA is not None:
101
+ resumo += f"Resumo DF_ESCOLA:\n{DF_ESCOLA.to_string(index=False)}\n\n"
102
 
103
+ if DF_TRANSGEN is not None:
104
+ resumo += f"Resumo DF_TRANSGEN:\n{DF_TRANSGEN.to_string(index=False)}\n\n"
105
 
106
  return resumo
107