In this chapter, you learned how to craft a model of an analysis and export it out to a script. In particular, you learned how to use ModelBuilder to create an analysis and export it out as a script and how to adjust the script to be more "Pythonic". After explaining about the auto-generated script, we adjusted the script to include a results analysis and summation, which was outputted to a CSV file. We also briefly touched on the use of Search Cursors, which will be covered in greater detail in Chapter 3, ArcPy Cursors: Search, Insert, and Update. Also, we saw how built-in modules such as the csv module can be used along with ArcPy to capture analysis output in formatted spreadsheets.
In the next chapter, we will investigate the powerful data access module and its Search Cursors, Update Cursors, and Insert Cursors.