Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import datetime
|
|
7 |
# Load the CSV file
|
8 |
df = pd.read_csv("anomalies.csv", quotechar='"')
|
9 |
|
10 |
-
df.rename(columns={"ds": "Ano e mês", "real": "Despesa", "group": "Grupo"})
|
11 |
|
12 |
print(df)
|
13 |
|
@@ -51,6 +51,9 @@ def response(user_question, table_data):
|
|
51 |
return query_result
|
52 |
|
53 |
# Streamlit interface
|
|
|
|
|
|
|
54 |
st.markdown("""
|
55 |
<div style='display: flex; align-items: center;'>
|
56 |
<div style='width: 40px; height: 40px; background-color: green; border-radius: 50%; margin-right: 5px;'></div>
|
|
|
7 |
# Load the CSV file
|
8 |
df = pd.read_csv("anomalies.csv", quotechar='"')
|
9 |
|
10 |
+
df.rename(columns={"ds": "Ano e mês", "real": "Despesa", "group": "Grupo"}, inplace=True)
|
11 |
|
12 |
print(df)
|
13 |
|
|
|
51 |
return query_result
|
52 |
|
53 |
# Streamlit interface
|
54 |
+
|
55 |
+
st.dataframe(table_data.sort_values(by=['Ano e mês', 'Despesa']), ascending=False) # Add this line to display the table data
|
56 |
+
|
57 |
st.markdown("""
|
58 |
<div style='display: flex; align-items: center;'>
|
59 |
<div style='width: 40px; height: 40px; background-color: green; border-radius: 50%; margin-right: 5px;'></div>
|