当我执行此代码时,我有 2 帧。有没有办法在一个根框架中显示它?
import pandas as pd
import mplfinance as mpf
from tkinter import *
root = Tk()
root.title("candle")
root.geometry('600x550')
def candle():
file = 'BTC-USD.csv'
data = pd.read_csv(file)
print(data.info())
data.Date = pd.to_datetime(data.Date)
data = data.set_index('Date')
print(data)
mpf.plot(data, type='candle', mav=(20),volume=True, style='yahoo')
button = Button(root, text="grapg", comand=candle())
button.pack()
root.mainloop()
下面是我上面代码的输出: