News for hackers. Stuff that matters.
Re:An Introduction to Scientific Python – Pandas by keypusher on Monday July 04, 2016 @05:06AM (#12029563)
Iterating over the rows much more intuitive to me, just like rows in a database. In their example dataframe each row is a year, and columns represent different information about that year. So, if I wanted to compare rain from oct-sep on a yearly basis, I would iterate over the years (rows) and then grab that column by name.
Re:An Introduction to Scientific Python – Pandas by filmor on Monday July 04, 2016 @05:56AM (#12029727)
It's inconsistent though, as iterating over a dataframe like

    for c in df:
will return the column labels. I expect `len(obj)` to return the same as `len([i for i in obj])`.
Re:An Introduction to Scientific Python – Pandas by sin7 on Monday July 04, 2016 @09:26AM (#12030600)
Between dplyr, ifelse, and apply family functions, I don't think I've ever had to iterate over a data frame in R.