#NEWLINE# def clean_data( self ) : #NEWLINE# #INDENT# for ii in self . _train_cols : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( max ( self . _raw [ ii ] ) == 'None' ) : #NEWLINE# #INDENT# self . _raw [ ( self . _raw [ ii ] == 'None' ) ] = 0 #NEWLINE# self . _raw [ ii ] = self . _raw [ ii ] . astype ( float ) #NEWLINE# #UNINDENT# #UNINDENT# except NameError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# to_remove = [ ] #NEWLINE# for ii in self . _train_cols : #NEWLINE# #INDENT# if ( ( len ( self . _positive ) == 0 ) or ( min ( min ( self . _positive [ ii ] ) , min ( self . _negative [ ii ] ) ) == max ( max ( self . _positive [ ii ] ) , max ( self . _negative [ ii ] ) ) ) ) : #NEWLINE# #INDENT# to_remove . append ( ii ) #NEWLINE# #UNINDENT# #UNINDENT# for ii in to_remove : #NEWLINE# #INDENT# if ( ii != 'bias' ) : #NEWLINE# #INDENT# self . _train_cols . remove ( ii )