1. sammyrulez
  2. data_munging_code_kata

Source

data_munging_code_kata / soccer / goals_spread.py

import re
import math
from kutil import dry

class GoalSpread(dry.BaseFileDifferentialObject):
	
	def eval_row(self,row):
		return (row[1],math.fabs( int(row[6]) - int(row[8])) )
		
	def is_row_data(self,row):
		return len(row) > 0 and re.search("^[0-9]*\.$",row[0])