I have a shapefile that contains three lines. I want to add a specific numeric id to the field "line_id" and a string id to the field "border_id". Basically, for the first line, I want to add the value '1' to "line_id" and 'North' to field "border_id". For the second line I want to add the value '2' to "line_id" and 'South' to field "border_id".
Here is my code, I think I don't get how the changeAttributeValues command works on pyQGIS.
lyr.startEditing()
provider = lyr.dataProvider()
provider.addAttributes([QgsField("line_id",QVariant.Double),(QgsField("border_id",QVariant.String))])
lyr.updateFields()
lyr.commitChanges()