Python相關網址 by 儲蓄保險王 · 2022-10-15 https://www.python-excel.org https://www.xlwings.org/ 相關文章Python: 如何讀取json檔? json.load(TextIOWrapper) #文本流輸入輸出封裝器; json.loads(str) 有何差別? 如何跳到文件的一開頭? f.seek(0,0) ; dict的key若重複,後面覆蓋前面Python: 如何批量將檔案更名?os.rename(old_name, new_name) ; glob.glob() #讀取資料夾中的所有檔案 ; os.path.split(fpath) = os.path.dirname(fpath) , os.path.basename(fpath) ; os.path.splitext(basename) #分離主/副檔名Python:如何建立新資料夾?os.mkdir() ; os.makedirs() ; 有何差別?Python 機器學習:手把手教你用 sklearn.preprocessing .StandardScaler 做數據標準化(Standardization); from sklearn.preprocessing import StandardScaler ; 儲存/載入 scaler or model: joblib.dump() / joblib.load()Python: 深入理解 pandas.concat():使用 ignore_index=True 合併 DataFrame 的奧秘 #效果同 reset_index( drop=True )Linux / Unix 指令: ps aux | grep XXX.py ; ifconfig ("interface configuration"); ip addr ; hostname -I查詢ip addressPython TQC考題: 輸入一個正整數n,並讀取read.txt內容,將首n列的每個英文字首字大寫輸出write.txt ; pandas.Series.str.title() #輸出csv或xlsx時,如何不輸出index 跟 header ? .to_csv( "write.txt", index=False, header=False)Python: 如何使用datetime模組來處理日期和時間的計算?如何計算時間差? from datetime import datetime ; datetime.strptime (date_string, format)Python: pandas.Series如何只保留str,去除重複值?#isinstance(x:Any, str) -> bool #.drop_duplicates() #Series.apply( function )逐元素應用function運算 #DataFrame.apply( function )逐Series應用function運算 .drop_duplicates() 跟.unique()有何差別?
近期留言