在 arcpy 中删除或删除 table 的代码是什么?
What's the code for dropping or deleting a table in arcpy?
这应该很容易查找,但我已经搜索了很长时间,但一直找不到。我什至无法在 Whosebug 上找到它。
我知道 arcpy.Delete_management
不会删除表格。就是这样。
Esri 的文档表明您可以使用 Delete (Data Management) 删除表。
Data Element; Graph; Layer; Table View
例如,下面显示了删除 .csv、.dbf 和 FGDB 表的测试方法。
import arcpy
# A list of .dbf, .csv, and FGDB tables
tables = [r'C:\path\to\your.gdb\fgdb_table',
r'C:\path\to\your\csv_table.csv',
r'C:\path\to\your\dbf_table.dbf']
# Perform the deletion
for table in tables:
arcpy.Delete_management(table)
这应该很容易查找,但我已经搜索了很长时间,但一直找不到。我什至无法在 Whosebug 上找到它。
我知道 arcpy.Delete_management
不会删除表格。就是这样。
Esri 的文档表明您可以使用 Delete (Data Management) 删除表。
Data Element; Graph; Layer; Table View
例如,下面显示了删除 .csv、.dbf 和 FGDB 表的测试方法。
import arcpy
# A list of .dbf, .csv, and FGDB tables
tables = [r'C:\path\to\your.gdb\fgdb_table',
r'C:\path\to\your\csv_table.csv',
r'C:\path\to\your\dbf_table.dbf']
# Perform the deletion
for table in tables:
arcpy.Delete_management(table)