You can make the change automatically by running in Python QGIS console the following code after selecting your layer
# Tested with categorised style using file https://github.com/nvkelso/natural-earth-vector/raw/master/geojson/ne_50m_admin_0_countries.geojson
# with column adm0_a3 for field
# Then, run the following
layer = iface.activeLayer()
fieldcolname = 'adm0_a3' # For your case, replace it with 'From'
for index, category in enumerate(layer.renderer().categories()):
identifier = category.value()
expr = QgsExpression(""""{}"='{}'""".format(fieldcolname, identifier))
filtered = layer.getFeatures(QgsFeatureRequest(expr))
if (filtered):
results = [f for f in filtered]
if len(results) == 1:
feature = results[0]
# Line below is where you could make change
# to fit the label formatting you want
# (by default it should be fine)
columnContent = "{}: {}".format(feature[fieldcolname], feature['name'])
layer.renderer().updateCategoryLabel(index, columnContent)
else:
print(results, category.value(), category.label())
else:
print("No result for filter")
# To refresh left part of the tree
# Can be unwanted for your situation
iface.layerTreeView().refreshLayerSymbology(layer.id())