I want to join a table (dbf from a zonal stats) to a FC and then calculate the mean from the dbf into a FC field. I can do it manually, but am hoping in Pro and ArcPy its faster than ArcMap and manual method. With over 1 million polygons joined, it takes about a week to calculate. Please review code below and advise what wrong. Just learning by pulling together examples of familiar processes, please speak noobie. THX!
Got the "add field" to work, the subset below is what fails...
# Set local variables
inFeatures = "f:/GreatPlains_NHF/Join_calc_test/105_45_532.gdb/Hex_subset105_45_532"
joinTable = "f:/GreatPlains_NHF/Join_calc_test/105_45_532_summary.dbf"
joinField = "hexagon_id"
expression = "Mean"
# Join the feature layer to a table
arcpy.AddJoin_management(inFeatures, joinField, joinTable, joinField)
# Calculate field from joined table ("Mean" attribute) to FC table.
arcpy.CalculateField_management(inFeatures, "mean_HD_ensamble", expression)
#