Skip to content

Commit 715257a

Browse files
committed
add information from Solution
1 parent ae4bc2e commit 715257a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

D17_optimization/homework.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
# 在速度較慢的時候,可以先從哪邊開始檢查?
1818
print('在速度較慢的時候,可以先從是否使用內建函數開始檢查')
19+
#correction
20+
print('''先檢查有沒有使⽤到⾃訂義的函數,如果有可以查詢pandas中是否有
21+
⽀援相關演算法,如果以上都沒辦法改善,那可以從資料讀取⽅式下⼿,將要
22+
讀取的資料改成pkl檔''')
1923
# 資料過大時應採取什麼方式讓記憶體占用量下降?
2024
print('資料過大時應採取: \n1.將欄位的型態降級,不需要存太多元素在一個數字中')
2125
print('2. 將整數型態 int 改成 uint 減少記憶體正用空間 int_data.apply(pd.to_numeric,downcast=unsigned')

0 commit comments

Comments
 (0)