Advertisement
den4ik2003

Untitled

Apr 5th, 2024
814
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. # for i in range(len(df)):
  2. #     if df.iloc[i]['asset'] == df.iloc[i + 1]['asset']:
  3. #         print(i)
  4.  
  5. # df = df.drop([1290]).reset_index()
  6. # df.iloc[1288:1300]
  7.  
  8. bal = []
  9.  
  10. for i in range(len(df) - 1):
  11.     d = {
  12.           'balance': df.iloc[i]['total_usdt'] + df.iloc[i + 1]['total_usdt'],
  13.           'upd': max(df.iloc[i]['update_time'], df.iloc[i+1]['update_time'])
  14.         }
  15.     bal.append(d)
  16.    
  17. frame = pd.DataFrame(bal)
  18.  
  19. fig = px.line(frame, x='upd', y='balance', title='total balance')
  20. fig.update_layout(
  21.     xaxis_title="time",
  22.     yaxis_title="total balance",
  23. )
  24. fig.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement