Additionally, I am not entirely sure what your python script actually achieves? The one you uploaded seems to just give “0”, regardless of what you put in your Excel sheet.
I’ve modified your script and now it is working for pipes. The thing is that you have to go back to revit, select all pipes and reapply type in order to get the correct pipe fittings after apply this script with dynamo because you are just changing pipe diameters, not pipe fitting diameters.