2 ms·
Sure if your column data is completely independent and you don't need more than one column at a time in a given algorithm, it is natural to iterate over columns
by nurettin 10y ago
Sure if your column data is completely independent and you don't need more than one column at a time in a given algorithm, it is natural to iterate over columns instead of rows. However if you need multiple columns (or data properties) at each iteration, which is more likely the case in my experience, then you end up iterating over the rows.
- lottin 10y agoThat's what Pandas encourages you to do! In my experience iterating is rarely needed at all if you have functions that operate on arrays.