Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
6bc40c6
1
Parent(s):
9f3b801
Update app.py
Browse files
app.py
CHANGED
@@ -46,22 +46,6 @@ with st.sidebar:
|
|
46 |
# Filter the DataFrame based on selected values
|
47 |
filtered_df = df[(df['Instituição'] == selected_instituicao) & (df['Conta'] == selected_conta)]
|
48 |
|
49 |
-
#Display the Forecasts values
|
50 |
-
if not filtered_df.empty:
|
51 |
-
data_string = filtered_df['Forecasts'].iloc[0]
|
52 |
-
|
53 |
-
# Split the string into lines
|
54 |
-
lines = data_string.split('\n')
|
55 |
-
|
56 |
-
# Iterate through the lines and extract the values
|
57 |
-
for line in lines[:-2]:
|
58 |
-
period, value = line.split()
|
59 |
-
num_float = float(value)
|
60 |
-
monetary_value = f'R$ {num_float:,.2f}' # Adding commas for thousands separator
|
61 |
-
st.write(f"Período {period}: {monetary_value}")
|
62 |
-
else:
|
63 |
-
st.warning('No data available for the selected filters.')
|
64 |
-
|
65 |
# Display the Forecasts values as line plots
|
66 |
if not filtered_df.empty:
|
67 |
st.subheader('Forecasts Line Plots')
|
|
|
46 |
# Filter the DataFrame based on selected values
|
47 |
filtered_df = df[(df['Instituição'] == selected_instituicao) & (df['Conta'] == selected_conta)]
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
# Display the Forecasts values as line plots
|
50 |
if not filtered_df.empty:
|
51 |
st.subheader('Forecasts Line Plots')
|