Azad Rasul
SmartRS

SmartRS

19- Delete a column of vector layer attribute

Azad Rasul's photo
Azad Rasul
·Jun 25, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

Firstly, open a shapefile that has an attribute table.

To delete the third column of the table use this code:

layer = iface.activeLayer()
layer.startEditing()
layer.deleteAttribute(2)
layer.commitChanges()

If you like the content, please SUBSCRIBE to my channel for the future content

 
Share this