Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

clear notebook output


from numba import jit


def CreateLabels(xdata,real_labels):
  new_labels = []
  for number,i in enumerate(xdata['Finding Labels']):
    print("Running Sample: {}".format(number+1)) #displays processing number
    new_labels.append(real_labels[i.split("|")[0]]) #some processing
    clear_output(wait=True) #to clear the output
  return np.array(new_labels)


new_labels = CreateLabels(data,labels)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clear #notebook #output
ADD COMMENT
Topic
Name
7+1 =