【发布时间】:2021-02-21 10:02:35
【问题描述】:
这是我的数据框
bedrijf = 公司
我需要创建一个将股票代码作为参数的函数(例如 TNET)并创建一个图表 以该股票的价格。这是开始的:
def graph(ticker):
stock = pd.DataFrame()
# needs to be replaced with the right code
# assuming the variable stock
# is a dataframe with the data of the stock as a row
# with the specified ticker, the code below ensures
# that x-Axis (xAs) contains the names of the columns and y-Axis (yAs) contains the values in those columns
xAs = stock.columns[2:26]
yAs = stock.iloc[0,2:26]
【问题讨论】:
标签: python pandas dataframe matplotlib graph