python 如何检测excel文件数据更新了,然后找出数据有变化的那一行?
看下面怎么读,i[0]对应的就是行号,从0开始记行
import pandas as pd
df1 = pd.read_excel( "score.xlsx")
for i in df1.iterrows():
print(i[0], i[1][0], i[1][1], i[1][2])
'''--result
0 0 7 4
1 0 7 6
2 1 5 9
3 1 5 8
4 1 5 3
5 1 6 2
6 0 7 9
7 0 8 8
8 1 4 7
9 0 5 5
10 0 3 1
'''
数据更没更新,你得有原始对比数据,也就是你得备份原始数据