AnsweredAssumed Answered

how to delete tables under a map using arcpy?

Question asked by teethdiao2 on Oct 3, 2020
Latest reply on Oct 3, 2020 by bixb0012

I try to draw a real-time map based on one field. And I will update this field with another kept-on-generating dataframe. I forgo to finish it with updateCursor because it is so slow. Instead, I try to convert dbf into a csv file and merge it with that dataframe then convert it back to the dbf file.

 

It works well in 1st time. But since I have used the function TableToTable_conversion to generate a dbf file, it will add a table under that map in arcgis pro. Therefore I have to delete that table first before I run ableToTable_conversion to generate a generated dbf file. So what is the corresponding code in arcpy to delete that table?

 

BTW: I can visit these tables using this code:

tbs = mp.listTables()

for tb in tb:

   print(tb.name)

Outcomes