I've been using ArcGIS Pro over ArcMap recently because ArcMap is giving me some incorrect summary statistics that I use to populate a data field in a number of feature classes. The problem is that I'm not very familiar with Python and I haven't been able to translate my VB Script expressions into Python.
The expression considers two data fields from the summary statistics table for each unique Site ID and either gives the study panel number [LAST_panel], or the evaluation status [LAST_Eval_Status] if the status is either "Dormant" or "Reject" and enters a value into a "Panel_Status" field in a point feature class.
Pre-Logic Script Code:
dim PS if [PARK_GRTS_EVAL_Statistics.LAST_Eval_Status]="Dormant" then PS="Dormant" elseif [PARK_GRTS_EVAL_Statistics.LAST_Eval_Status]="Reject" then PS="Reject" else PS= [PARK_GRTS_EVAL_Statistics.LAST_panel] end if
In the expression above, PARK is a stand-in for a location code, since there are multiple locations and datasets I'm working with. The workaround I've been using is to create the summary statistics in ArcGIS Pro and then doing the field calculator in ArcMap 10.5 but it would be more efficient if I could do it all in ArcGIS Pro. Plus it would benefit me to learn a bit of Python.
How do I translate this into Python 3?