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: pandas.DataFrame 如何對某些欄做格式化字串? apply(); applymap() ; map() 的差別? df[‘Salary’] = df[‘Salary’].map( ‘${:,.2f}’ .format) Python: pandas.DataFrame 如何對某些欄做格式化字串? apply(); applymap() ; map() 的差別? df[‘Salary’] = df[‘Salary’].map( ‘${:,.2f}’ .format)](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2023/05/20230527091636_49.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![Python: pandas.read_excel(r”路徑\檔名.副檔名”, header = None), 自動加上0,1…的欄標籤, DataFrame如何取某一直欄或橫列? 如何用 .iloc[bool_list] 取出判斷式為真的那一列? bool_list = list( df[0] == 0 ) ; bool_list = list(df[0].isin([0])) ; DataFrame如何顯示完整的資料? pandas.set_option ( “display.max_rows”, None) Python: pandas.read_excel(r”路徑\檔名.副檔名”, header = None), 自動加上0,1…的欄標籤, DataFrame如何取某一直欄或橫列? 如何用 .iloc[bool_list] 取出判斷式為真的那一列? bool_list = list( df[0] == 0 ) ; bool_list = list(df[0].isin([0])) ; DataFrame如何顯示完整的資料? pandas.set_option ( “display.max_rows”, None)](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2022/11/20221128164005_44.png?quality=90&zoom=2&ssl=1&resize=350%2C233)




近期留言