Another question: How would I modify the last piece of code to output loop results to a table? I tried append and copy rows. This didn't work (RuntimeError: Object: Error in executing tool) arcpy.CreateTable_management("C:/Output", "mmc2.dbf", "") arcpy.AddField_management("mmc2.dbf", "Map_Code", "Text", 9, "", 10, "", "NULLABLE", "") arcpy.AddField_management("mmc2.dbf", "Frequency", "LONG", 9, 0, "", "", "NULLABLE", "") arcpy.AddField_management("mmc2.dbf", "DataSource", "Text", 9, "", 255, "", "NULLABLE", "") for mc, val in dct.items(): lst_ds = sorted(set(val[1])) # make a unique sorted list freq_tot = val[0] arcpy.CopyRows_management([freq_tot, mc, ";".join(lst_ds)], mmc2)
... View more