In PyVis - search Node is described a way of including images in nodes when the nodes are added to network one by one.
I wonder if there is a similar way when using net.add_nodes().
I have a .csv file where I can create a column with links to images which should be shown in several nodes. I thought that I could use a list as for adding for instance the labels in order to also show the images.
Something like:
import pandas as pd
from pyvis import network as net
file_nodes = 'x_y_z.csv'
g = net.Network(notebook=True, width="65%", height="1000px", heading="", cdn_resources="remote")
nodes = list(got_nodes['Group'])
level_lst = list(got_nodes['Level'])
descr_lst = list(got_nodes['Group_title'])
color_lst = ['crimson', 'red', 'magenta', 'deepskyblue', 'aqua', 'skyblue', 'lime']
img_lst = list(got_nodes['Image'])
shp_lst = list(got_nodes['Shape'])
color_map = [color_lst[item] for i, item in enumerate(level_lst)]
g.add_nodes(nodes,
label=list(got_nodes['Group']),
title=[descr_lst[i] for i in range(0, len(descr_lst))],
color=[color_map[i] for i in range(0, len(color_map))],
shape=[f'{shp_lst[i]}' for i in range(0, len(shp_lst))],
image=[f'./{img_lst[i]}' for i in range(0, len(img_lst))])
However this does not work.
Any solution?