Spaces:
Running
Running
Commit
•
58e577a
1
Parent(s):
a3f2892
Update app.py
Browse files
app.py
CHANGED
@@ -118,14 +118,12 @@ for conta in tab_df['Conta'].unique():
|
|
118 |
except ValueError:
|
119 |
print(f"Skipping line unable to convert to float: {line}")
|
120 |
|
121 |
-
# Format the sum as a monetary value
|
122 |
-
monetary_value = f'R$ {conta_sum:,.2f}'
|
123 |
-
|
124 |
# Append the data to the list
|
125 |
-
data.append({'Conta': conta, 'Modelo': modelo, 'Próximos 12 meses':
|
126 |
|
127 |
# Convert the list to a DataFrame
|
128 |
table_data = pd.DataFrame(data)
|
|
|
129 |
|
130 |
labels = table_data['Conta']
|
131 |
sizes = [(i / total_sum) * 100 for i in table_data['Próximos 12 meses']]
|
|
|
118 |
except ValueError:
|
119 |
print(f"Skipping line unable to convert to float: {line}")
|
120 |
|
|
|
|
|
|
|
121 |
# Append the data to the list
|
122 |
+
data.append({'Conta': conta, 'Modelo': modelo, 'Próximos 12 meses': conta_sum})
|
123 |
|
124 |
# Convert the list to a DataFrame
|
125 |
table_data = pd.DataFrame(data)
|
126 |
+
total_sum = table_data['Próximos 12 meses'].sum()
|
127 |
|
128 |
labels = table_data['Conta']
|
129 |
sizes = [(i / total_sum) * 100 for i in table_data['Próximos 12 meses']]
|