File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
samples/04_gis_analysts_data_scientists Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 232
232
}
233
233
],
234
234
"source": [
235
- "import importlib\n",
236
235
"try:\n",
237
- " if importlib.find_module(' arcpy'): \n",
238
- " has_arcpy = True\n",
239
- " print(\"arcpy present\")\n",
236
+ " import arcpy\n",
237
+ " has_arcpy = True\n",
238
+ " print(\"arcpy present\")\n",
240
239
"except:\n",
241
240
" print(\"arcpy not present\")"
242
241
]
4321
4320
"outputs": [],
4322
4321
"source": [
4323
4322
"cur_field_name = \"MarketHealthIndex\"\n",
4324
- "if has_arcpy :\n",
4325
- " if cur_field_name not in hlth_lyr.layers[0].properties.fields :\n",
4323
+ "if cur_field_name not in hlth_lyr.layers[0].properties.fields :\n",
4324
+ " if has_arcpy :\n",
4326
4325
" cur_field_name = \"market_health_index\"\n",
4327
- "else:\n",
4328
- " cur_field_name = \"MarketHeal\""
4326
+ " else:\n",
4327
+ " cur_field_name = \"MarketHeal\""
4329
4328
]
4330
4329
},
4331
4330
{
4612
4611
"outputs": [],
4613
4612
"source": [
4614
4613
"cur_field_name2 = \"ForecastYoYPctChange\"\n",
4615
- "if has_arcpy :\n",
4616
- " if cur_field_name2 not in hlth_lyr.layers[0].properties.fields :\n",
4614
+ "if cur_field_name2 not in hlth_lyr.layers[0].properties.fields :\n",
4615
+ " if has_arcpy :\n",
4617
4616
" cur_field_name2 = \"forecast_yo_y_pct_change\"\n",
4618
- "else:\n",
4619
- " cur_field_name2 = \"ForecastYo\""
4617
+ " else:\n",
4618
+ " cur_field_name2 = \"ForecastYo\""
4620
4619
]
4621
4620
},
4622
4621
{
You can’t perform that action at this time.
0 commit comments