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: 從兩個時間字串開始:用 timedelta 計算時間差,並學會分辨屬性與方法兩種做法; from datetime import datetimePython .encode() 字符串編碼與轉換,ord()函數求得chr的ASCII碼,struct.pack()Python Counter 速查與實戰指南;from collections import CounterPython: matplotlib繪圖, ax.plot (pandas.Series, pandas.DataFrame) 一次畫出多條折線圖; fig, ax = plt.subplots() #一次創建fig, ax兩個物件 ; fig = plt.figure() ; ax = fig.add_subplot(1, 1, 1) #fig, ax 分兩次建立 ; ax = df.plot()Python 進階技巧:海象運算子 (Walrus Operator) 實戰教學 [w_clean for w in words if (w_clean:=w.lower().strip()) and w_clean not in STOPWORDS]Python: pandas.DataFrame與numpy.ndarray回測1995年初~2022年底,新興市場溢酬是否存在?Python PyMuPDF fitz 教學:從pdf中抓文字、抓 fonts、抓表格; pip install PyMuPDF ; import fitz ; text_dict = page.get_text("dict") #type(page) is pymupdf.Page ; blocks:list[dict] = text_dict['blocks'] ; page.find_tables().tables [0].extract() ;如何判斷粗體字?Python 網頁解析入門:BeautifulSoup 的 find vs select_one; find_all vs select ; Python 風格 vs CSS selector (支援 #id, .class, 層級選擇); from bs4 import BeautifulSoupWord表格設計,TQC考題204:成績單,段落前分頁
0 Python: pandas.DataFrame 如何找出重複值並計算重複次數? counts = df[duplicates] .groupby([‘name’]) .size() .reset_index(name=’count’) 2023-03-15
近期留言