letylin / pyptbook Goto Github PK
View Code? Open in Web Editor NEW金融大數據二部曲, 書名: Python 網頁程式交易APP實作~Web + MySQL + Django. 讀者可以在此下載教學資源含課本範例、程式更新等資訊. 歡迎讀者對本書有任何疑問, 在此討論。
金融大數據二部曲, 書名: Python 網頁程式交易APP實作~Web + MySQL + Django. 讀者可以在此下載教學資源含課本範例、程式更新等資訊. 歡迎讀者對本書有任何疑問, 在此討論。
您好:在ch13匯入資料出現錯誤
LOAD DATA local INFILE 'C:/Users/User/Desktop/company.txt'
INTO TABLE company
CHARACTER SET utf8
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\n'
IGNORE 1 LINES;
執行後第一行執行出現錯誤
ERROR 1046 (3D000) at line 1: No database selected
勞煩您指點 謝謝
執行結果的圖
"字串轉成數值 = 500"
好像多出來了 按照範例code執行也沒有跑出來
您好,
1.下載的檔案裡,缺少文字檔「stock2330.txt」。
2.第7-13頁,E_7_4.js的第8、9行,是否調整如下較適當:
8 var selclass = document.querySelector(classname).tagName;
9 alert("class 的第一個元素是 " + selclass);
我照著書上設定urls.py可是一直出現"NameError: name 'result' is not defined"這個錯誤,請問是什麼問題呢?感覺好像是view.py return那邊設定的問題?
以上 感謝回覆
可否提供作業的code碼,
因為自學的話,有些無法寫出來,
謝謝。
為何我跟隨書上的教學從Google Finance匯入資料庫,
https://finance.google.com/finance/historical?q=TPE:3008&startdate=Jan%201%2C%292917&enddate=Jan%2016%2C%202018&num=200&ei=yA5eWrHINoqe0QTmhKCIAw&start=200
=========
Google 那邊像是禁止了這:
在網址列上打上會出現
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
在code內運行出現
HTTP Error 403: Forbidden
Internal Server Error: /E_14_2_Py/
Traceback (most recent call last):
File "/Users/andrewwan/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py", line 1945, in get_loc
return self._engine.get_loc(key)
File "pandas/index.pyx", line 137, in pandas.index.IndexEngine.get_loc (pandas/index.c:4154)
File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)
File "pandas/hashtable.pyx", line 675, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12368)
File "pandas/hashtable.pyx", line 683, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12322)
KeyError: 'dates'
......
你好: google finance 服務已於4月上旬關閉對外的服務, 請到Code頁面, 我有放yahoo finance的爬蟲程式. 請改用此程式.
你好,想請問3-9頁 E_3_3.html
輸入完之後執行網頁無法顯示執行結果
全部空白
有什麼原因嗎 檢查過程式碼都是對的
請問我把myapp/templates
的網頁附近進去後
runserver
結果我的瀏覽器去開網頁內容
開不起來
終端顯示
UnicodeDecodeError: 'cp950' codec can't decode byte 0xe2 in position 9735: illegal multibyte sequence
p9-14頁中的文字檔stock2330.txt
是否可提供下載呢
謝謝
老師您好
想跟老師請問一下
為何回傳的是標籤而不是值
謝謝老師~
以下是我html
<script type="text/JavaScript"src="DOM03.js"></script> 存取HTML標籤<hr>
<ul id="fclass"><li>房地產</li><li>股票</li><li>基金</li></ul>
<input type="checkbox" name="inv_exper"value="warrant">權證
<input type="checkbox" name="inv_exper"value="stock">期貨選擇權
<input type="checkbox" name="inv_exper"value="fund">債卷<br><br>
<hr>
<input type="button" onclick="ById()"value="getElementById">
<input type="button" onclick="ByTagName()"value="getElementsByTagName">
<input type="button" onclick="ByName()"value="getElementsByName"><br>
<input type="button" onclick="ByClassName()"value="getElementsByClassName"><br>
<p id="result"></p>
以下是我JS
function ById(){
document.getElementById("result").innerHTML="getElementById()";
}
function ByTagName(){
var w = document.getElementsByTagName("Li");
document.getElementById("result").innerHTML=w[2].innerHTML;
}
function ByName(){
var w = document.getElementsByName("inv_exper")[0].tagName;
document.getElementById("result").innerHTML=w;
}
function ByClassName(){
var w= document.getElementsByClassName("format");
var temp="";
for(i=0;i<w.length;i++){
temp+=w[i].tagName+"";
}
document.getElementById("result").innerHTML=temp;
}
關於pandans在資料讀取上好像有技術上的問題:
(1)會產生is_list_like is not defined
(2)目前好像無法抓取超過四
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.