I have a shapefile based on 27 locations, with historical values at each location for each month of the year going back to 1974. The file has 11,000 values. I have been trying to work on a script to select the 27 locations for each month of each year to eventually create shapefile for each monthly set of the 27 locations.
import arcpy arcpy.env.overwriteOutput = True arcpy.env.workspace = "C://project" LocationFile = "C://project//27location.shp" FieldList = arcpy.ListFields("27location.shp") for field in FieldList: print field.name # check for fields cursor = arcpy.da.SearchCursor(Locationfile, ["NAME", "VALUE", "MONTH", "YEAR"]) for row in cursor: # select based on monthly values at the 27 locations into a seperate shapefile.
I hope this makes sense I have been struggling to interpret code.