Clear Notebook Saída


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)
Muhammad Usman Shakeel