Spaces:
Running
Running
drguilhermeapolinario
commited on
Update views/cad_cid.py
Browse files- views/cad_cid.py +9 -7
views/cad_cid.py
CHANGED
@@ -10,10 +10,18 @@ st.title("Atualização de cadastro - UBS Flamengo")
|
|
10 |
|
11 |
add_vertical_space(10)
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Load the Excel file
|
14 |
@st.cache_data
|
15 |
def load_data():
|
16 |
-
file_path =
|
17 |
df = pd.read_excel(file_path, sheet_name="ANALISE", engine='openpyxl')
|
18 |
df["ATUALIZADO"] = pd.to_datetime(df["ATUALIZADO"], errors="coerce", dayfirst=True)
|
19 |
df["Trimestre"] = df["ATUALIZADO"].dt.to_period("Q")
|
@@ -25,12 +33,6 @@ def load_data():
|
|
25 |
|
26 |
return df
|
27 |
|
28 |
-
#df = load_data()
|
29 |
-
uploaded_file = st.sidebar.file_uploader("Adicione o arquivo Excel", type= ".xlsx")
|
30 |
-
if uploaded_file is not None:
|
31 |
-
df = load_data()
|
32 |
-
|
33 |
-
|
34 |
# Custom CSS for dark theme
|
35 |
st.markdown(
|
36 |
"""
|
|
|
10 |
|
11 |
add_vertical_space(10)
|
12 |
|
13 |
+
|
14 |
+
|
15 |
+
#df = load_data()
|
16 |
+
uploaded_file = st.sidebar.file_uploader("Adicione o arquivo Excel", type= ".xlsx")
|
17 |
+
if uploaded_file is not None:
|
18 |
+
df = load_data()
|
19 |
+
|
20 |
+
|
21 |
# Load the Excel file
|
22 |
@st.cache_data
|
23 |
def load_data():
|
24 |
+
file_path = uploaded_file
|
25 |
df = pd.read_excel(file_path, sheet_name="ANALISE", engine='openpyxl')
|
26 |
df["ATUALIZADO"] = pd.to_datetime(df["ATUALIZADO"], errors="coerce", dayfirst=True)
|
27 |
df["Trimestre"] = df["ATUALIZADO"].dt.to_period("Q")
|
|
|
33 |
|
34 |
return df
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
# Custom CSS for dark theme
|
37 |
st.markdown(
|
38 |
"""
|