0

I want to only show the output without the head line but it kept printing

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

How can I only show the values without the headlines printed or to hide in the for loop

1 Answers1

0

You can get the actual values by indexing the series that you get out. If you first interpret it as a NumPy array, you can get the values you'd like

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