20140817_09_HX400V_宜蘭國際童玩節_土耳其 by 儲蓄保險王 · 2014-08-27 20140817_09_HX400V_宜蘭國際童玩節_土耳其 https://www.youtube.com/watch?v=gnCYOBgK9Js 相關文章Python DOCX 手術刀:精準切片與瘦身 (OOXML 實戰); from lxml import etree; doc_xml = zfin.read('word/document.xml') ; doc_tree = etree.fromstring(doc_xml) ; used_rids = set( doc_tree.xpath( "//@r:embed | //@r:link | //@r:id", namespaces=ns_map)) #獲取 word/document.xml 有使用的used_rids => 讀取 document.xml.rels 建立白名單 keep_files以及黑名單 rels_to_remove ,要移除的Relationship節點 => 從 XML 樹中移除未使用的 Relationship 節點 => 重寫 Zip (過濾孤兒檔案, 更新document.xml.rels,其他原樣複製)Python 進階:解剖 Word 底層 - 手動封裝 CT_P 與 CT_Tbl 全攻略; from docx.text.paragraph import Paragraph ; from docx.table import Table; para = Paragraph(child, doc) ; table = Table(child, doc)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是小HTML,可以使用相同的方法Python: list.index() 只能找到第一個元素的index,若元素有重複,如何找出所有index? indexes = [index for index, value in enumerate(my_list) if value == target]Python爬蟲:BeautifulSoup的.find_all() 與select() ; from bs4 import BeautifulSoup ; .string .text .get_text() 獲取文字內容Python: pandas.DataFrame如何移除所有空白列?pandas.isna( df_raw[0] ).tolist() ; df_drop0 = df_raw.drop(nanIdx,axis=0).reset_index(drop=True)Python: os.listdir(路徑) -> list ,回傳該路徑中有那些檔案,目錄; fpath = os.path.join(folder, "*.csv" ) ; glob.glob(fpath) #通配符匹配(globbing),抓取目錄下的指定檔案名稱Word雙欄獨立頁碼ADB(Android Debug Bridge)和Appium (Python套件)
0 Python Pathlib 實戰:優雅地篩選多種圖片檔案; images = [f for f in p.glob(“*”) if f.suffix.lower() in img_extensions] 2026-01-27
0 Python: pandas.DataFrame (df) 的取值: df [單一字串] 或df [list_of_strings] 選取一個或多個columns; df [切片] 或 df [bool_Series] 選取多個rows #bool_Series長度同rows, index也需要同df.index ,可以使用.equals() 確認: df.index.equals(mask.index) 2025-04-20
0 Python: 十進位的67305985是二,八,十六進位的多少?二進位前綴0b ; 八進位octal (前綴0o) ; 十六進位hexadecimal(前綴0x) ;前綴可將二,八,十六進位數字轉為十進位 ; 十進位數字轉為二,八,十六進位: bin(number) ; oct(number) ; hex(number) 2022-11-16
近期留言