Thanks for replying.
I think I have found that the answer lies in the following code for in-situ updates. I have tried it and it seems to work.
#protos is the column name
protos = df.proto.unique()
proto_dict = dict(zip(protos, range(len(protos))))
df=df.applymap(lambda s: proto_dict.get(s) if s in proto_dict else s)
Thanks again for taking the time to reply.
Gerry