alexaxbreadbytes commited on
Commit
35f46c1
1 Parent(s): c7bbc4c

Update app.py

Browse files

date formatter

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -347,7 +347,9 @@ def runapp():
347
  'P/L per token':'Net P/L'}, inplace=True)
348
 
349
  st.subheader("Trade Logs")
350
- st.dataframe(grouped_df.style.format({'Avg. Buy Price': '${:.2f}', 'Sell Price': '${:.2f}','# of DCAs':'{:.0f}', 'Net P/L':'${:.2f}', 'P/L %' :'{:.2f}%'})\
 
 
351
  .applymap(my_style,subset=['Net P/L'])\
352
  .applymap(my_style,subset=['P/L %']), use_container_width=True)
353
 
 
347
  'P/L per token':'Net P/L'}, inplace=True)
348
 
349
  st.subheader("Trade Logs")
350
+ grouped_df['Entry Date'] = pd.to_datetime(grouped_df['Entry Date'])
351
+ grouped_df['Exit Date'] = pd.to_datetime(grouped_df['Exit Date'])
352
+ st.dataframe(grouped_df.style.format({'Entry Date':'{:%m-%d-%Y %H:%M:%S}','Exit Date':'{:%m-%d-%Y %H:%M:%S}','Avg. Buy Price': '${:.2f}', 'Sell Price': '${:.2f}','# of DCAs':'{:.0f}', 'Net P/L':'${:.2f}', 'P/L %' :'{:.2f}%'})\
353
  .applymap(my_style,subset=['Net P/L'])\
354
  .applymap(my_style,subset=['P/L %']), use_container_width=True)
355