第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

哪位大神幫忙看看,這是出了什么問題,怎么運(yùn)行不了,還拋異常!

哪位大神幫忙看看,這是出了什么問題,怎么運(yùn)行不了,還拋異常!

yuantongxin 2016-05-15 15:26:51
from?matplotlib.finance?import?quotes_historical_yahoo_ochl from?datetime?import?date import?pandas?as?pd today?=?date.today() start?=?(today.year-2,?today.month,?today.dat) quotes?=?quotes_historical_yahoo_ochl('MSFT',?start,?today) attributes?=?['date','open','close','high','low','volume'] quotesdf?=?pd.DataFrame(quotes,?columns?=?attributes) list1?=?[] for?i?in?range(0,?len(quotes)): ????x?=?date.fromordinal(int(quotes[i][0])) ????y?=?date.strftime(x,?'%Y/%m/%d') list1.append(y) quotesdf.index?=?list1 quotesdf?=?quotesdf.drop(['date'],?axis?=?1?) quotesdf.ix['14/01/30':'14/02/10',['open',?'close']] quotesdf['14/01/01':'15/01/01'].sort('close',?ascending=False)[0:5] list1?=?[] tmpdf?=?quotesdf['15/01/01':'15/12/31'] for?i?in?range(0,?len(tmpdf)): ????list1.append(int(tmpdf.index[i][3:5])) tmpdf['month']?=?list1 print?tmpdf[?tmpdf.close?>?tmpdf.open]['month'].value_counts()
查看完整描述

2 回答

  • 2 回答
  • 1 關(guān)注
  • 4692 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)