2

I have over 1,000 records in a .shp file, all with a unique ID field (LINKID), along with many other fields containing data (TXTFLD1, TXTFLD2, INTFLD1, INTFLD2, etc).

These records have been copied into a spreadsheet, checked, updated, and re-imported into QGIS as a .csv. The .csv file still has the unique LINKID to create a link between the two datasets, and they still have exactly the same field names.

I am fairly new to QGIS and I am completely new to Python.

How do I use it to update the existing vector layer attributes from the updated .csv file?

Or is there a better way of doing it?

I want to overwrite the data fields in the .shp file with the data in the .csv. This is a process that I will have to do hundreds of not thousands of times, and I do not particularly want to have to update each field manually every time, and I would like the process to be automated.

  • 1
    Join attribute tables in the toolbox should be, what you're looking for. – Erik Mar 1 at 12:55
  • @Erik Thanks, but I don't just want to join the two tables together, I want to overwrite the 'old' data in the .shp file and I would prefer to have it done automatically. – PhiliusMaximus Mar 1 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.