19- Delete a column of vector layer attribute
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