#NEWLINE# def setup( self ) : #NEWLINE# #INDENT# n = 500000 #NEWLINE# np . random . seed ( 2718281 ) #NEWLINE# arr = [ ( 's%04d' % i ) for i in np . random . randint ( 0 , ( n // 10 ) , size = n ) ] #NEWLINE# self . ts = Series ( arr ) . astype ( 'category' )