Issue
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
Solution
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])
Answered By - Marcel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.