This question already has an answer here:

I am working on a stand alone script in python that will allow to me to specify a shapefile and being able to find a value and replace it with a new value. Does anyone know what code will allow me to do this?

marked as duplicate by underdark Apr 30 '15 at 18:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Yes - the link provided by @Andy contains code that will do what you're looking for. – Radar Apr 30 '15 at 17:54

If you want to solve this problem, then you'd have to take a look into UpdateCursor (there you will find some examples on how to apply it).

that will allow to me to specify a shapefile

What do you mean by this? You want your function (presumably you're making one inside your script) that takes in a shapefile?

Not the answer you're looking for? Browse other questions tagged or ask your own question.