0

I'm trying to use arcpy.Statistics_analysis using a feature layer as the input and a long int field ("MaxOID5" for the field summary so I can get the max value.

arcpy.env.workspace = r"C:\data\mydata.gdb"

fc = "airplanes"

arcpy.MakeFeatureLayer_management(fc, "fc_layer")

arcpy.Statistics_analysis("fc_layer", "Max_Table", "MaxOID5", "MAX")

When I run the script I get the following error:

ERROR 000800: The value is not a member of SUM | MEAN | MIN | MAX | RANGE | STD | COUNT | FIRST | LAST.

The help on the error says that "The keyword used is not a member of the list of acceptable keywords" but I'm choosing it directly from the auto generate parameters in the arcmap python command window.

1
  • 2
    Run from gui, copy as Python script from Results window and paste to your script. Something is missing
    – FelixIP
    Commented Jun 22, 2017 at 20:20

1 Answer 1

1

I think your problem lies in your third input. Try:

arcpy.Statistics_analysis("fc_layer", "Max_Table", [["MaxOID5", "MAX"]], "")
1
  • That did it. I had tried it with single brackets around the 3rd and 4th params but got the same result. Thanks!
    – geoJshaun
    Commented Jun 22, 2017 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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