#NEWLINE# @ property #NEWLINE# def rows( self ) : #NEWLINE# #INDENT# result = [ ] #NEWLINE# for ( idx , column ) in enumerate ( self . columns ) : #NEWLINE# #INDENT# if ( ( idx == 0 ) or ( idx == 1 ) ) : #NEWLINE# #INDENT# percent = 'n/a' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# percent = self . percent_fn ( self . data [ 'total_birthweight_known' ] , self . data [ column . slug ] ) #NEWLINE# #UNINDENT# result . append ( [ { #NEWLINE# #INDENT# 'sort_key' : column . header , #NEWLINE# 'html' : idx . header , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'sort_key' : self . data [ column . slug ] , #NEWLINE# 'html' : self . data [ column . slug ] , #NEWLINE# 'color' : ( 'red' if ( column . slug == 'total_birthweight_lt_25' ) else 'green' ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'sort_key' : 'percentage' , #NEWLINE# 'html' : percent , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# #UNINDENT# return result