I'm trying to do some elementary tasks with ArcPy and ArcGIS, namely separate some information in a file into separate shapefiles based on values for a field.
My initial file has a field called "Source" and "Source" contains combined information for each record about its state and type of feature (rail, road, utlility etc.), given in a string format like "NYRDLINES" (NY, roads) or "MAUTLINES" (Massachussetts, Utilities). I want to create shapefile outputs with just information for, say, roads in NY or utilities in MA.
To do this, I've used "AddField_management" to add 2 new fields to the table: "State, and Feature type", but don't know how to retrieve the information from "Source" to separate into my 2 new fields. I think I should be using "CalculateField_management" to calculate the field values, but am stumped when it comes to defining the expression to be used.
How can I do this?