Skip to content

Instantly share code, notes, and snippets.

@tianhaoz95
Last active November 20, 2021 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tianhaoz95/1b3a1091b4ae0e715390986defc02432 to your computer and use it in GitHub Desktop.
Save tianhaoz95/1b3a1091b4ae0e715390986defc02432 to your computer and use it in GitHub Desktop.
import streamlit as st
import pandas as pd
crypto_wallet_history = upload_csv('Crypto)
fiat_wallet_history = upload_csv('Fiat')
visa_card_history = upload_csv('Visa')
features = fetch_feature_flags()
combined_history = pd.concat([crypto_wallet_history, fiat_wallet_history, visa_card_history])
if not combined_history.empty:
total_investment = investment_histroy[
(investment_histroy['Currency'] == 'USD')
& (investment_histroy['Transaction Kind'] == 'van_purchase')
]['Amount'].sum()
if 'summary' in features:
st.metric(label='Total Investment',
value='$ {0}'.format(total_investment))
if 'raw_table' in features:
st.write(combined_history)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment