Hi Sonal G. Nitish J.
i see here 'end' goes undefined here
Also i have put few debug statement and value of pair is as following, which doesn't have any string 'data-title'
code block:-
if not ready_for_save:
print('No labels have been assigned. Run the previous cell to create candidate pairs and assign labels to them before re-running this cell.')
else:
# ASSIGN LABEL VALUE TO CANDIDATE PAIRS IN DATAFRAME
# ========================================================
# for each pair in displayed widget
for pair in vContainers[1:]:
print(f'pair - {pair}')
print(f'child - 0 {pair.children[0].get_interact_value()}')
print(f'child -1 {pair.children[1].get_interact_value()}')
# get pair and assigned label
html_content = pair.children[1].get_interact_value() # the displayed pair as html
print(html_content)
user_assigned_label = pair.children[1].get_interact_value() # the assigned label
print(f'user_assigned_label - {user_assigned_label}')
# extract candidate pair id from html pair content
print(pair.children[0].value)
start = pair.children[0].value.find('data-title="')
if start > 0:
start += len('data-title="')
end = pair.children[0].value.find('"', start+2)
pair_id = pair.children[0].value[start:end]debug output for pair -
VBox(children=(HTML(value='z_cluster1745227944884:01745227944884:0recId3938810439329100fname moll oliverlname mortlock clarkestNo2624add1 morgan ctescent dumas streetadd2 mullewa scarboroughareacode30642065state nsw nswdob1911120119441106ssn75986988433873'), ToggleButtons(button_style='info', index=2, options=('Uncertain', 'Match', 'No Match'), value='No Match'), HTML(value='')))