With arcpy, I want to calculate the mean value of a specific field in a shapefile and print the resulting value for the user. I use the Summary Statistics tool and it works, but the resulting value is stored in a table at a specific path, but how can I access the calculated value with python?
Here is my code. It will only output the path to the table, but I need the calculated value.
stats = arcpy.Statistics_analysis(myshapefile, "G:/temp/stats", [[field, "MEAN"]]) arcpy.AddMessage(stats.getOutput(0))