Date
June 13, 2023
類型
正式課程
程度
初階中階
領域
資料科學資料處理資料庫
單元要先準備事項
- 建議至少認識 List, Dict, Pandas,可能更有資料儲放的概念,但其實也不影響
- 任意先準備一份歷史 K 棒數據,可以參考
Unit 2. 如何下載歷史 K 棒數據(以幣安為例) 獲得
單元重點
- 認識資料庫系統(Database System)&資料庫(Database)&資料庫管理系統(Database Management System)
- 認識 SQLite
- 實作將 CSV 存入 SQLite
- 學會用 Python 讀取 SQLite(包括內建套件&轉成 DataFrame)
安裝的套件
- 會用到
sqlite3, 但正常來說已經內建安裝了 pip install pandaspip install csv-to-sqlite(新面孔)
單元內容
進階挑戰
- 可以試試看不使用
csv-to-sqlite套件,而是使用內建的csv套件,自己進行讀取 csv 的動作,並自己練習用 SQL 語法建立資料庫。 - 完全不會 SQL 的同學可以看下面補充連結進行練習。
Code(請配合影片內容教學食用)
(權限設定是使用報名時填寫的 email,單元推出當月有訂閱權限者才有權限,但影片內容有帶 coding 的部分,所以依舊能學到)
補充連結
- DB Browser: SQLite 圖形化操作介面
- 不會特別介紹所有的 SQL 語法,未來也只會用到什麼說什麼,但建議各位自己可以進行學習。幾個推薦幾個可以交互式練習 SQL 的網站給大家
DB Browser for SQLite
The Official home of the DB Browser for SQLite.
sqlitebrowser.org
SELECT basics/zh - SQLZOO
sqlzoo.net
SQLBolt - Learn SQL - Introduction to SQL
SQLBolt provides a set of interactive lessons and exercises to help you learn SQL
sqlbolt.com
SQL Teaching
The easiest way to learn SQL
www.sqlteaching.com
SQL Tutorial
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
