#NEWLINE# def column_has_value( data , fieldname ) : #NEWLINE# #INDENT# 'Check if at least one cell in column has non-zero and non-blank value' #NEWLINE# has_value = False #NEWLINE# for row in data : #NEWLINE# #INDENT# value = row . get ( fieldname ) #NEWLINE# if value : #NEWLINE# #INDENT# if isinstance ( value , basestring ) : #NEWLINE# #INDENT# if strip_html ( value ) . strip ( ) : #NEWLINE# #INDENT# has_value = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# has_value = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return has_value