**我是新的 python DF,我有一个两列的 excel 文件,我想在其中循环遍历它的行。如果列“数量”超过其行的值为零,我想从第一列获取每一行的横档值并保留在列表中。
import pandas as pd**
df = pd.read_excel(file)
reuslt =[]
for i in range(len(df)):
amount = df.iloc[i,1]
result.append(shelf)
Example detial excel file
shelf amount
11 0
13 1
15 8
18 0
20 6
22 0
25 1`