Visual Studio Code (VS code)
齒輪圖示>
命令選擇區
快捷鍵: Ctrl + Shift +P
要在左邊的視窗按快捷鍵
不是終端區或寫code的區域

英文版:

搜尋 Python: Select Interpreter:

即可切換不同版本的直譯器:

如果Python: Select Interpreter
出現錯誤的話
四個正方形的圖示
Extensions (Ctrl+Shift+X)
搜尋並安裝:
Python Extension Pack

方法2:
齒輪圖示 > Settings (Ctrl + ,)

搜尋找到: Default Interpreter Path後
設定python.exe的路徑:

Spyder:
Tools => Preference =>
Python interpreter =>
Use the following Python interpreter

Spyder console:
!where python
可以知道python的安裝路徑
如何知道該路徑的python版本?

推薦hahow線上學習python: https://igrape.net/30afN



![Python四種型態增加元素 list.append(元素), tuple = tuple + (元素, ), set.add(元素), dict[key]=value Python四種型態增加元素 list.append(元素), tuple = tuple + (元素, ), set.add(元素), dict[key]=value](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2022/05/20220513083711_22.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![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: 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)](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2025/04/20250420212553_0_6fb2c3.png?quality=90&zoom=2&ssl=1&resize=350%2C233)





近期留言