#NEWLINE# def add_bin_labels( self , data ) : #NEWLINE# #INDENT# col = self . columns [ 0 ] #NEWLINE# data . _data [ ( col + '_values' ) ] = data . _data [ col ] #NEWLINE# for bin in self . bins : #NEWLINE# #INDENT# data . _data . ix [ ( data . _data [ ( col + '_values' ) ] . isin ( bin . values ) , col ) ] = bin . label [ 0 ] #NEWLINE# #UNINDENT# data . _data [ col ] = pd . Categorical ( data . _data [ col ] , categories = list ( bin . items ) , ordered = self . sort )