title: Thinking like pandas: how to update all rows in order(row use info of row before)
body: <p>I have a functional code that takes an element of a list of dict one by one in chronological order and apply some function that update data using values of previous list.</p>
  <p>How I do this in pandas? Its line operate row by row in order its against pandas philosophy.</p>
  <p>I have 400 000 rows of games of chess I chronological order with columns with info like result of the game, name of players, etc.</p>
  <p>I will have a skill value for each player that in a new game I will use like prior and estimate a new skill value with the info of the new game.</p>
  <p>So I will go to the first row start with a generic prior and estimate with only that data the skill of both players. Then go to the next game (next row) and use the info of prior of the estimated of the last row. And so on. <em><strong>So I don't see how I can lose the idea of iterate, it can be done?</strong></em></p>
  <p>Here an &quot;example&quot; of the type of things that do my problem. I reduced it to a data frame with 2 columns with players id, in which in each row these two play against in a game of chess and then the result (win or lose) is in a other column. Also there is a column with the handicap for player 2 (is positive or negative) and a column of game type. So the minimalist example is to assign a prior number of ranking to each player and start estimating their ability's .</p>
  <pre><code>game_list
  player = {}
  for g in game_list:
      g['priorPlayer1'] = player.get(g['player1'], skillPrior ) # if is a new player thats not in the dic player, its assing a skill prior. 
      g['priorPlayer2'] = player.get(g['player2'], skillPrior ) # the output of skillPrior is a Gaussian, but when i did something like this in pandas, it only take the mean value and not all the info
      
      handicap_key = (g['handicap'], g['gameType']) # info of handicap and game type
      teamP1 = funcTeam([g['priorPlayer1']]) # function that estimate ability to a team, in this case is alone
      if handicap_key[0]&gt;1: # if there is handicap
          handicap_factor = hanedicap.get(handicap_key, FunRatingPrior)
          teamP2 = funcTeam([g['priorPlayer2'],handicap_factor])
      else:
          teamP2 = funcTeam([g['priorPlayer2']])
  
      [g['posteriorPlayer1']], teamP2_post = funcPosterior([teamP1,teamP2],g['result'])
      
      if handicap_key[0] &gt;1:
          g['handicap_prior'] = teamP2[1]
          g['posteriorPlayer2'], g['handicap_posterior']  = teamP2_post
          handicap[handicap_key] = g['handicap_posterior']
  
              if handicap_key in handicap_history:
                  handicap_history[handicap_key].append(g['handicap_posterior'] )
              else:
                  handicap_history[handicap_key] = [g['handicap_posterior'] ]
  
          else:
              [g['posteriorPlayer2']] = teamP2_post
              g['handicap_prior'] = None     
  
      player[g['player1']] = g['posteriorPlayer1']
      player[g['player2']] = g['posteriorPlayer2']
  </code></pre>