如何删除 for 循环输出中 excel 的标题行

How can i remove the head line of excel in for loop output

我只想显示没有标题行的输出,但它一直在打印

for i in range(0,10):
    print (df.loc[i:i])

如何只显示不打印标题或隐藏在 for 循环中的值

您可以通过索引您得到的系列来获取实际值。如果你首先将它解释为一个 NumPy 数组,你可以得到你想要的值

for i in range(0, 10):
    line = df.loc[i].to_numpy()
    print(line[0], line[1])