How to pass paramters to arcpy.Statistics_analysis function...

3548
1
09-25-2014 11:11 AM
AnastasiaAourik
New Contributor II

I have this code:

print "  start running statistics analysis - task 2 for IHS"

IHS_STATS_LIST="PRODUCTION_ID COUNT;OPERATOR COUNT;OIL_CUM SUM;OIL_CUM MAX;OIL_CUM MEAN;GAS_CUM SUM;GAS_CUM MAX;GAS_CUM MEAN;WTR_CUM SUM;WTR_CUM MAX;WTR_CUM MEAN;OIL_LATEST_MO SUM;OIL_LATEST_MO MAX;OIL_LATEST_MO MEAN;GAS_LATEST_MO SUM;GAS_LATEST_MO MAX;GAS_LATEST_MO MEAN;;WTR_LATEST_MO SUM;WTR_LATEST_MO MAX;WTR_LATEST_MO MEANOIL_YTD SUM;OIL_YTD MAX;OIL_YTD MEAN;GAS_YTD SUM;GAS_YTD MAX;GAS_YTD MEAN;WTR_YTD SUM;WTR_YTD MAX;WTR_YTD MEAN;TD MAX;TVD MAX"

arcpy.Statistics_analysis(IHS_HM_Task2_In, IHS_HM_Task2_Out, IHS_STATS_LIST, "FID_RP_US_Counties")

print "   finished Task 2 for IHS at " + str(datetime.datetime.now())

 

But it fails...

0 Kudos
1 Reply
AnastasiaAourik
New Contributor II

Ooopsy...  silly me, I typed in a few extra stats by hand and had syntax errors..

More than one (semicolon) and missing semicolon between stats item...

Never mind...

0 Kudos