加速度计是高频采样的,如何将UTC时间转换为浮点时间?

accelerometer is sampled at high frequency , how to convert UTC time to float time?

 import pandas as pd
 df = pd.DataFrame(['Time':['16:47:55.510','16:47:55.511','16:47:55.410']})
 df

 output:
            Time
 0      16:47:55.510
 1      16:47:55.511
 2      16:47:55.410

如何使用python将这个时间值转换为浮点值?

如果时间是 h:m:s.ms 格式,你可以这样做:

hours, minutes, seconds = df.Time[0].split(':')
total_seconds = int(hours) * 3600 + int(minutes) * 60 + float(seconds)