Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Commit
•
88f86f4
1
Parent(s):
d86bdf9
Update app.py
Browse files
app.py
CHANGED
@@ -97,11 +97,11 @@ if not filtered_df.empty:
|
|
97 |
|
98 |
# Iterate through the lines and extract the values
|
99 |
for line in lines[:-1]: # Skip the last two lines which might not contain forecast data
|
100 |
-
value = line.split()
|
101 |
num_float = float(value)
|
102 |
monetary_value = f'R$ {num_float:,.2f}' # Adding commas for thousands separator
|
103 |
mes += 1
|
104 |
-
col1.write(f"{mes}: {monetary_value}")
|
105 |
else:
|
106 |
col1.warning('No data available for the selected filters.')
|
107 |
|
@@ -117,12 +117,15 @@ if not filtered_df.empty:
|
|
117 |
# Split the string into lines
|
118 |
lines = data_string.split('\n')
|
119 |
|
|
|
|
|
120 |
# Iterate through the lines and extract the values
|
121 |
for line in lines[:-1]:
|
122 |
period, value = line.split()
|
123 |
num_float = float(value)
|
124 |
monetary_value = f'R$ {num_float:,.2f}' # Adding commas for thousands separator
|
125 |
-
|
|
|
126 |
|
127 |
# Create a DataFrame from the list
|
128 |
chart_data = pd.DataFrame(data)
|
|
|
97 |
|
98 |
# Iterate through the lines and extract the values
|
99 |
for line in lines[:-1]: # Skip the last two lines which might not contain forecast data
|
100 |
+
period, value = line.split()
|
101 |
num_float = float(value)
|
102 |
monetary_value = f'R$ {num_float:,.2f}' # Adding commas for thousands separator
|
103 |
mes += 1
|
104 |
+
col1.write(f"Mês {mes}: {monetary_value}")
|
105 |
else:
|
106 |
col1.warning('No data available for the selected filters.')
|
107 |
|
|
|
117 |
# Split the string into lines
|
118 |
lines = data_string.split('\n')
|
119 |
|
120 |
+
mes = 0
|
121 |
+
|
122 |
# Iterate through the lines and extract the values
|
123 |
for line in lines[:-1]:
|
124 |
period, value = line.split()
|
125 |
num_float = float(value)
|
126 |
monetary_value = f'R$ {num_float:,.2f}' # Adding commas for thousands separator
|
127 |
+
mes += 1
|
128 |
+
data.append({'Period': int(mes), 'Monetary Value': num_float})
|
129 |
|
130 |
# Create a DataFrame from the list
|
131 |
chart_data = pd.DataFrame(data)
|