到「程式交易040」下載檔案,然後拷貝程式碼,貼到spyder,另存新檔案abc.py但一定要和下載的檔案同一目錄。
電腦學過HTML, CSS(控制網頁的樣式style), Javascript, Python
import csv#吳崧晹python #輸入csv套件comma separated value
file = open('SPY.CSV','r') #打開下載的檔案SPY.CSV,模式是r讀取,
csvreader = csv.reader(file) #將檔案讀入變數csvreader
header, rows = [], [] #宣告空白串列(陣列,清單)
header = next(csvreader) #串列header儲存檔案第一列
for row in csvreader: #檔案接續逐列附加append於rows串列
rows.append(row)
file.close() #關閉檔案
print(header)
print('吳崧晹分析資料數目'+str(len(rows)))
參考的線內css指令
<pre style='border: 3px double blue'>double也可以使用其他實心solid點線dotted虛線dashed
https://d11117328.blogspot.com/2025/06/pythoncsvtkintermarkowitz.html
回覆刪除https://d11117328.blogspot.com/2025/06/blog-post.html
https://d11117328.blogspot.com/2025/05/listdictsetexcel.html
https://d11117328.blogspot.com/2025/05/powerpoint1mp41mp4.html
https://d11117328.blogspot.com/2025/05/2025power-d11117328.html
https://d11117328.blogspot.com/2025/03/pythonspy.html
https://d11117328.blogspot.com/2025/04/pythoncsv.html
https://d11117328.blogspot.com/2025/03/pythoncsvspdr500etf19931292025320.html
https://d11117328.blogspot.com/2025/03/202537-d11117328.html
https://d11117328.blogspot.com/2025/04/500spy.html