well. I'm close now. The current code is:import arcpy, os
table = r"c:\users\craig.mcdade\GridforPython.dbf" # source_table
new_table = r"c:\users\craig.mcdade\table.dbf" # new table
tempTable = r'\\in_memory\temp_table'
outPath = r'\\in_memory\outPath'
keyField = 'NAME'
valField = 'Pg_Number'
tableDict = {}
arcpy.MakeTableView_management(table, tempTable)
with arcpy.da.SearchCursor(tempTable, [keyField, valField]) as cursor:
for row in cursor:
tableDict.setdefault(row[0], []).append(row[1])
open("new_table","w")
insertCursor = arcpy.da.InsertCursor(os.path.join(outPath, new_table), [keyField, valField])
for key, val in tableDict.iteritems():
insertCursor.insertRow((key, ', '.join(val)))
I was getting a Runtime Error: cannot open 'c:\...'so I added the open("new_table","w") linenow I get a Runtime Error of Permission denied: 'new_table'I have allowed full permissions on the dbf file so I'm not sure why it isn't allowing it to open.