Category: 攝影或3C
Python如何讀取excel檔(.xlsx)?如何用欄標籤提取某一直行?df=pandas.read_excel() ; df[“欄標籤”]
import pandas as pd f3 = r”C...
Python讀取csv逗點分隔檔: pandas.read_csv(r”路徑\檔名.副檔名”) vs csv.reader(io.TextIOWrapper) 有何差別? 為何出現ParserError? #Parser:解析器,如何讀取Excel檔(xlsx)?pandas.read_excel()
先看以下兩個逗點分隔檔: txt檔為記事本自行寫入 csv檔為Lib...
Python: pandas, import pandas as pd ; s =pd.Series() ; s.index ; s.values; 類比於dict.keys ; dict.values ; Series有index跟value,可以跟dict互轉;同list的切片可以取值
# -*- coding: utf-8 -*- import pan...
Python: 對純量(整數int,浮點數float)取list()跟array()會如何? numpy.array(scalar) ; list(scalar), 2D array的運算
程式碼: a = 1 lsta = list(a) print(ls...
Python: Spyder如何顯示空格?Tools -> Preferences: Editor -> Show blank spaces:
Tools -> Preferences: Ed...
Python如何開文字檔案?取出某一直行?with open(fpath,’r’) as f: for line in f: lst = line.split()
fpath=r’c:\Python\Radar_2022...
Python: Spyder介面如何改為垂直分割?View -> Windows layouts -> Vertical split,若沒出現Vertical split怎麼辦? Tools -> Reset Spyder to factory defaults
Spyder: View -> Windows layouts...
近期留言