Python: Visual Studio Code如何強制終止程式?終端機位置,滑鼠右鍵 > Stop Code Run (快捷鍵: Ctrl + Alt + M) by 儲蓄保險王 · 2022-09-08 在終端機位置 滑鼠右鍵 > Stop Code Run (快捷鍵: Ctrl + Alt + M) 相關文章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)Python爬蟲:BeautifulSoup的 .find_all() 與 .find() 與 .select('標籤名[屬性名1="屬性值1"][屬性名2="屬性值2"]') ; from bs4 import BeautifulSoup ; Live Server(可以預覽HTML的VS Code套件)Python: 如何用 difflib.get_close_matches() 比對字串相似度並儲存結果Python IDE(Integrated Development Environment 整合開發環境) colab如何掛載雲端硬碟?from google.colab import drive; drive.mount( '/content/drive' ) ; 檔案複製shutil.copy() #shell utility; 檔案移動shutil.move( source_file, destination_path); 刪除整個資料夾shutil.rmtree( folder_to_delete ); 刪除某一個檔案os.remove() #shutil.remove()會觸發AttributeError; 如何將檔案路徑拆分為父資料夾與檔案名稱(含副檔名)? os.path.dirname( file_path) ; os.path.basename( file_path) 如何將檔案名稱拆分為主檔名與副檔名? os.path.splitext( file_name) #split(分裂) ext的意思Python: 如何使用 subprocess.run() 執行外部命令?Python: 如何進行測試流程的黑名單過濾Python: 如何讀取json檔? json.load(TextIOWrapper) #文本流輸入輸出封裝器; json.loads(str) 有何差別? 如何跳到文件的一開頭? f.seek(0,0) ; dict的key若重複,後面覆蓋前面Python: List[ pandas.Series ] 轉DataFrame技巧:正確理解row和column的關係,同 concat( List[ pandas.Series ], axis=1 ).TPython: 網路爬蟲 selenium 開啟chrome瀏覽器自動連線 ; chrome = webdriver.Chrome( options=options ) ; Python的命名慣例: 全大寫表示常數,首字大寫表示Class
0 Python set 集合 { },交集(intersection) & 像and, 聯集(union) | 像or, 差集(difference)-像減法或not, 對稱差集(symmetric difference)^交集除外 xor 2022-05-04
0 Python: numpy 4d array如何取值? pandas如何去掉空列/空欄? 如何重置DataFrame的index/欄標籤? df_drop = df_Raw.dropna (axis=0, how=”all”).reset_index(drop=True) ; df_drop1.columns = list(range(df_drop1.columns.size)) 2022-12-22
近期留言