Jun-01-2019, 01:06 PM
We can specify that sort of thing with a range(), but I didn't see anything equivalent in iterrows. I generally avoid using range to iterate over indexes, preferring to iterate directly. You could do it with a range like this:
for row_index in range(0, len(data), 3): row = df.ix[row_index] print(row)Although I think islice from the itertools built-in package might work better:
for index, row in itertools.islice(data.iterrows(), 0, len(d), 3): print(row)
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures