import numpy as np
import pandas as pd
def func(arg):
timeArray = time.strptime(arg, “%Y/%m/%d %H:%M:%S.000.”)
timeStamp = int(time.mktime(timeArray))
return timeStamp
def time_label_add(data): #添加时间戳以后请,手动把第一列数据删掉
data[‘timestamp’] = data[‘时间’].apply(func)
file_name = uuid.uuid1();
data.to_excel(‘C:/’+file_name+’.xlsx’)
return ‘C:/’+file_name+’.xlsx’
data = pd.read_excel(‘C:/number.xlsx’)
data.to_excel(‘C:/number.xlsx’)