Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # for i in range(len(df)):
- # if df.iloc[i]['asset'] == df.iloc[i + 1]['asset']:
- # print(i)
- # df = df.drop([1290]).reset_index()
- # df.iloc[1288:1300]
- bal = []
- for i in range(len(df) - 1):
- d = {
- 'balance': df.iloc[i]['total_usdt'] + df.iloc[i + 1]['total_usdt'],
- 'upd': max(df.iloc[i]['update_time'], df.iloc[i+1]['update_time'])
- }
- bal.append(d)
- frame = pd.DataFrame(bal)
- fig = px.line(frame, x='upd', y='balance', title='total balance')
- fig.update_layout(
- xaxis_title="time",
- yaxis_title="total balance",
- )
- fig.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement