Python: while迴圈 by 儲蓄保險王 · 2022-03-06 Python: while迴圈 total =10 while total < 100: print(total) total = total + 10 執行結果: 10 20 30 40 50 60 70 80 90 相關文章Python: 如何解析網址? from urllib.parse import urlparse, parse_qsPython如何讀取csv逗點分隔檔(每列內容為現金流),計算新光人壽增有利IRR,免費下載IRR計算機Python安裝套件時出現Verifying transaction: failed. The current user does not have write permission to the target envirment.如何以系統管理員身分執行Anaconda Prompt? pip list ; pip show beautifulsoup4 確認是否安裝成功Python: 正則表示法(regular expression)中的量詞: +*? ; reading="100.000" units="degrees C" ; 如何以空格分割字串,卻不分割"degrees C"中的空格? re.findall(r'(\w+)="([^"]*)"', input_string)Python讀取或儲存mat檔(dict), import scipy.io ; dic = scipy.io.loadmat(pathf) ; scipy.io.savemat(SavePath, rawdict)Python: pandas.DataFrame.astype() 函数方法的使用; df1.astype( dtype = np.float64, errors = "ignore")Python: 自定義函數計算計程車車資(先typing,再用預設值), 巢狀字典以及typing.Union[ ], assert 斷言Python爬蟲: 理解 response.text 與 BeautifulSoup 對象之間的關鍵區別 from bs4 import BeautifulSoup as bs ; response = requests.get(url) ; soup = bs(response.text) ; bs4.element.Tag .find_all() ; .select() ; .find() 差別為何?soup是大HTML, tag是小HTMLPython如何輸出多分頁的xlsx? with pandas .ExcelWriter ("output.xlsx") as writer:
0 Python: Spyder5.4.2的IPython Console出現 Figures now render in the Plots pane by default. To make them also appear inline in the Console, uncheck “Mute Inline Plotting” under the Plots pane options menu. 如何在IPython Console中查詢python路徑與版本: !python -V ; !where python 2023-05-08
0 Python機器學習: train_test_split() 切割資料(波士頓地區房價)為訓練資料跟測試資料; from sklearn.model_selection import train_test_split ; xtrain, xtest, ytrain, ytest = train_test_split(x, y, test_size=0.3, random_state=42, shuffle=True) 2022-12-14
近期留言