我收到的數據,看起來像下面:導入Python和打印特定字的所有行一個txt文件中的字符串
0,JW111101,Run Name
0,111116,Date
0,+2.5,Increment
0,2=0,Start Station
0,1=Fri 11 Nov 2016 14:21:44,Date & Time Stamp
0,6=1 Off 4On,Cycle Times
0,6=Fluke 189B,Meter Type
0,6=Racal Landstar,GPS Reciever
0,1=Fri 11 Nov 2016 14:21:47,Date & Time Stamp
0,6=COMPANY NAME,142156.00,29.0638153,95.3436157,-1.2
0,6=LINE NAME,142156.00,29.0638153,95.3436157,-1.2
1,6=Test Station,142255.00,29.0638145,95.3436133,-0.9
1,6=-1559 On NG,142255.00,29.0638145,95.3436133,-0.9
1,6=-1169 Off NG,142255.00,29.0638145,95.3436133,-0.9
1,6=1Approx.,142255.00,29.0638145,95.3436133,-0.9
1,6=AC 0.735,142255.00,29.0638145,95.3436133,-0.9
1,1558,GPS Not Available
1,1460,142350.00,29.0638166,95.3436115,-0.9
1,1185z,142351.00,29.0638167,95.3436116,-0.9
1,1554,142352.00,29.0638166,95.3436116,-0.9
我想在第三列找到的最小和最大的數字。第三列實際上是一個utc時間戳。
我最終的目標是能夠確定何時開始,何時結束以及持續時間。
任何人都可以指向正確的方向嗎?
yea。查找字符串操作,'datetime'模塊(strptime,strftime,toordinal)和'max'函數。 – Uriel
謝謝,我會檢查他們 –