I'm trying to merge multiple tables using the Join Field function in ArcPy. This script currently runs perfectly to merge the multiple tables but gives the columns new names. However, I will like the file name appended to the new columns as they are added to the table.
How can I modify my code to add columns with the file name appended?
import arcpy arcpy.env.workspace = "d:/INDICES5/Pixelnum/SAVI" tables = arcpy.ListTables() in_data = "d:/INDICES5/Pixelnum/SAVI/PixelnumSAVI2020.dbf" for table in tables: arcpy.JoinField_management(in_data,"Pixel_num", table,"Pixel_num")