def _calculate_pa(row):
    """    
    Returns:
        The number of plate appearances by a player as an int
        based on the following formula: 
    
        PA = AB + BB + SF + SH + HBP - IBB
        
    """    
    PA = (row['AB'] + row['BB'] + row['SF'] + row['SH'] + row['HBP'] \
          - row['IBB'])
    return PA