我有一個從外部應用程序導出爲CSV文件等讀CSV而分組行
15/07/2008 2:48:53 PM
Measurement device:; dvp3445
Field detector:; Diode
Reference detector:; Undefined
Scan mode:; Continuous
Points [mm]:
X; Y; Depth; Normalized field; Current field; Ratio
0.0; -109.0; 20.0; 1.3; 0; 0.0
0.0; -108.7; 20.0; 1.3; 0; 0.0
0.0; -108.4; 20.0; 1.3; 0; 0.0
0.0; -108.0; 20.0; 1.3; 0; 0.0
0.0; -107.7; 20.0; 1.3; 0; 0.0
15/07/2008 5:28:50 PM
Measurement device:; dvp3445
Field detector:; Diode
Reference detector:; Undefined
Scan mode:; Continuous
Points [mm]:
X; Y; Depth; Normalized field; Current field; Ratio
0.0; -108.7; 40.0; 1.3; 0; 0.0
0.0; -108.4; 40.0; 1.4; 0; 0.0
0.0; -108.1; 40.0; 1.4; 0; 0.0
0.0; -107.8; 40.0; 1.4; 0; 0.0
0.0; -107.5; 40.0; 1.5; 0; 0.0
0.0; -107.2; 40.0; 1.6; 0; 0.0
0.0; -106.9; 40.0; 1.6; 0; 0.0
15/07/2008 5:28:50 PM
Measurement device:; dvp3445
Field detector:; Diode
Reference detector:; Undefined
Scan mode:; Continuous
Points [mm]:
X; Y; Depth; Normalized field; Current field; Ratio
0.0; -106.6; 40.0; 1.7; 0; 0.0
0.0; -106.3; 40.0; 1.8; 0; 0.0
0.0; -106.0; 40.0; 1.8; 0; 0.0
0.0; -105.7; 40.0; 1.9; 0; 0.0
0.0; -105.4; 40.0; 2.0; 0; 0.0
0.0; -105.1; 40.0; 2.1; 0; 0.0
0.0; -104.8; 40.0; 2.2; 0; 0.0
0.0; -104.5; 40.0; 2.3; 0; 0.0
1.4 Python的CSV讀者的任何處理這種情況因爲我找的輸出3列,每列對應於點標題X; Ÿ;深度;標準化場;當前字段;比。
我試圖使用正則表達式解析來實現這一點,但它不起作用。有人可以分享一些想法嗎?
GT
試試我的解決方案 – eyllanesc