Skip to content

Commit

Permalink
Merge pull request #19 from guillaumepot/debug-0.1.2
Browse files Browse the repository at this point in the history
Debug 0.1.2
  • Loading branch information
guillaumepot authored Jul 3, 2024
2 parents 7fc43b2 + 60e0656 commit 2184b2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
api_version=0.2.0
streamlit_version=0.2.0
api_version=0.1.2
streamlit_version=0.1.2
2 changes: 1 addition & 1 deletion src/api/api_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
VARS
"""
# API metadatas
api_version = "0.1.0"
api_version = "0.1.2"
current_state = "Prod"

# UUID Generation
Expand Down
6 changes: 4 additions & 2 deletions src/streamlit/streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,10 @@
# Interactive display of transactions
with st.expander("View Transactions"):
st.dataframe(df_transactions)
total_displayed_transactions_amount = df_transactions["amount"].apply(lambda x: float(x.split(" ")[0])).sum()
st.markdown(f"**Total amount in displayed accounts:** {total_displayed_transactions_amount:.2f} €", unsafe_allow_html=True)
credit_amount = df_transactions[df_transactions["type"] == "credit"]["amount"].apply(lambda x: float(x.split(" ")[0])).sum()
debit_amount = df_transactions[df_transactions["type"] == "debit"]["amount"].apply(lambda x: float(x.split(" ")[0])).sum()
evaluated_amount = credit_amount - debit_amount
st.markdown(f"**Evaluated amount in transactions:** {evaluated_amount:.2f} €", unsafe_allow_html=True)



Expand Down

0 comments on commit 2184b2e

Please sign in to comment.