import xlrd
file_path = r"C:\Users\Allen\Desktop\数据曲线.xlsx"
table = xlrd.open_workbook(file_path).sheet_by_index(2)
data_current = table.col_values(4)[1:]
data_time = table.col_values(2)[1:]
time_start = []
for i in data_current:
index = data_current.index(i)
if float(i) < 0.1 and float(data_current[index+1]) > 1:
print('come on!')
else:
print('a')
and my data_current = ['0.0', '0.0', '1.44'] just an example ,the same structure! so why my output awlays is the a?
Aucun commentaire:
Enregistrer un commentaire