こんな感じでしょうか
Python
1import pandas as pd
2import numpy as np
3import io
4
5input_data = """
6time,user,nice,system,idle,iowait,irq,softirq,steal
71900-01-01 15:59:36.600,,,,,,,,
81900-01-01 15:59:36.700,14.666667,0.0,17.000000,40.666667,0.000000,1.333333,0.333333,0.0
91900-01-01 15:59:36.800,17.833333,0.0,18.500000,35.833333,0.000000,0.666667,0.666667,0.0
101900-01-01 15:59:36.900,13.000000,0.0,16.500000,28.500000,0.000000,1.500000,0.000000,0.0
111900-01-01 15:59:37.000,16.833333,0.0,19.666667,42.333333,0.000000,1.166667,0.000000,0.0
121900-01-01 15:59:44.100,16.000000,0.0,18.000000,45.500000,0.666667,1.666667,0.000000,0.0
131900-01-01 15:59:44.200,16.666667,0.0,18.666667,39.833333,0.000000,1.333333,1.000000,0.0
141900-01-01 15:59:44.300,17.333333,0.0,18.333333,43.666667,0.000000,0.666667,0.000000,0.0
151900-01-01 15:59:44.400,16.000000,0.0,16.666667,36.000000,0.000000,0.666667,0.333333,0.0
161900-01-01 15:59:44.500,10.000000,0.0,15.333333,36.000000,0.000000,1.333333,0.666667,0.0
17"""
18df = pd.read_csv(io.StringIO(input_data))
19df['time'] = df['time'].apply(np.datetime64)
20df = df.set_index('time')
21
22print(df)
23"""
24 user nice system idle iowait irq softirq steal
25time
261900-01-01 15:59:36.600 NaN NaN NaN NaN NaN NaN NaN NaN
271900-01-01 15:59:36.700 14.666667 0.0 17.000000 40.666667 0.000000 1.333333 0.333333 0.0
281900-01-01 15:59:36.800 17.833333 0.0 18.500000 35.833333 0.000000 0.666667 0.666667 0.0
291900-01-01 15:59:36.900 13.000000 0.0 16.500000 28.500000 0.000000 1.500000 0.000000 0.0
301900-01-01 15:59:37.000 16.833333 0.0 19.666667 42.333333 0.000000 1.166667 0.000000 0.0
311900-01-01 15:59:44.100 16.000000 0.0 18.000000 45.500000 0.666667 1.666667 0.000000 0.0
321900-01-01 15:59:44.200 16.666667 0.0 18.666667 39.833333 0.000000 1.333333 1.000000 0.0
331900-01-01 15:59:44.300 17.333333 0.0 18.333333 43.666667 0.000000 0.666667 0.000000 0.0
341900-01-01 15:59:44.400 16.000000 0.0 16.666667 36.000000 0.000000 0.666667 0.333333 0.0
351900-01-01 15:59:44.500 10.000000 0.0 15.333333 36.000000 0.000000 1.333333 0.666667 0.0
36"""
37
38print(type(df.index[0]))
39"""
40<class 'pandas._libs.tslibs.timestamps.Timestamp'>
41"""
42
43df.index = (df.index - df.index[0]).astype('uint64') / 1e9
44print(df)
45"""
46 user nice system idle iowait irq softirq steal
47time
480.0 NaN NaN NaN NaN NaN NaN NaN NaN
490.1 14.666667 0.0 17.000000 40.666667 0.000000 1.333333 0.333333 0.0
500.2 17.833333 0.0 18.500000 35.833333 0.000000 0.666667 0.666667 0.0
510.3 13.000000 0.0 16.500000 28.500000 0.000000 1.500000 0.000000 0.0
520.4 16.833333 0.0 19.666667 42.333333 0.000000 1.166667 0.000000 0.0
537.5 16.000000 0.0 18.000000 45.500000 0.666667 1.666667 0.000000 0.0
547.6 16.666667 0.0 18.666667 39.833333 0.000000 1.333333 1.000000 0.0
557.7 17.333333 0.0 18.333333 43.666667 0.000000 0.666667 0.000000 0.0
567.8 16.000000 0.0 16.666667 36.000000 0.000000 0.666667 0.333333 0.0
577.9 10.000000 0.0 15.333333 36.000000 0.000000 1.333333 0.666667 0.0
58"""
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/11/11 03:22