20140817_12_HX400V_宜蘭國際童玩節_泰國 by 儲蓄保險王 · 2014-08-30 20140817_12_HX400V_宜蘭國際童玩節_泰國 http://youtu.be/jIPjwCdsSjk 相關文章Python: 若符合特定條件或觸發AssertionError, 如何提前終止函式?將return置於if, elif, except AssertionError的縮排之下Python: 如何使用random.sample 從10個號碼中挑出不重複的三個號碼; random.shuffle弄亂十個數字的順序後,挑選前三個數字Python: 淺拷貝(Shallow Copy)和深拷貝(Deep Copy); list切片有淺拷貝的效果 ; pandas.Series.copy(deep=True) 可對Series對向執行深拷貝Python: List[ pandas.Series ] 轉DataFrame技巧:正確理解row和column的關係,同 concat( List[ pandas.Series ], axis=1 ).TPython爬蟲: 理解 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: 循環播放 英文單詞及其中文翻譯Python GUI: tkinter中.get()與.cget()的差別為何? #configuration ; entry_widget.get() ; label_widget.cget("text") ; label_widget = tk.Label( window, text = "Hello, World!")Python: 如何從Excel檔的欄位字母(column letter)獲取index? from openpyxl.utils import column_index_from_string, get_column_letter ; 從DataFrame的column name獲取index: pandas.DataFrame.columns .get_loc( "column_name" )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) #分離主/副檔名
0 Python物件導向 (Object-oriented programming,簡稱OOP): 類別變數 __class__.PI ; 物件變數 self.PI ; 類別方法 @classmethod cls.PI ; 靜態方法 @staticmethod 2023-03-12
0 Python如何讀取json檔?dic = json.loads( json_str ) ; json的保留字:null, true, false(區分大小寫,全小寫), null(非”null”,非Null)自動轉譯為None, true(非”true”,非True)自動轉譯為True(bool), false(非”false”,非False)自動轉譯為False(bool);colab如何掛載雲端硬碟? from google.colab import drive ; json檔的decode與encode? json.load() ; json.loads() ; json.dump() ; json.dumps() #s代表string的意思,有s的指令,參數需使用str type 2023-07-11
近期留言