<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722527#M55953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This could be one way of doing it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = tuple(arcpy.da.SearchCursor("Countieslayer", "FIPS_TXT"))[0][0] &amp;nbsp;&amp;nbsp;&amp;nbsp; urows = arcpy.da.UpdateCursor("Stewardship", "County") &amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urow[0] = countycode &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.updateRow(urow)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jul 2013 21:26:35 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2013-07-16T21:26:35Z</dc:date>
    <item>
      <title>From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcpy.da</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722522#M55948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote code using the arcpy.searchCursor and arcpy.UpdateCursor but want to switch to arcpy.da.SearchCursor and arcpy.da.UpdateCursor. I tried to change it but I get an error message in the lines after the updatecursor. Does anybody can tell me what I am doing wrong? Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed from this&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; srows = arcpy.SearchCursor("Countieslayer", )&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id = 1&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for srow in srows:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # assign a variable for the value of srow.getValue("FIPS_TXT) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = srow.FIPS_TXT&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get a collection of rows for the update cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # create the update cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows = arcpy.UpdateCursor("Stewardship")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # cycle through the rows (in this case only 1) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # to actually update the row in the cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # with the values obtained from the search cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urow.County = countycode&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.updateRow(urow)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id += 1 &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; with arcpy.da.SearchCursor("Countieslayer", ("FIPS_TXT")) as cursor:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id = 1 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = "" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode2 = ""&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # assign a variable for the value of srow.getValue("FIPS_TXT)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = row[0]&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get a collection of rows for the update cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # create the update cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor("Stewardship", ("County")) as cursor:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # cycle through the rows (in this case only 1) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # to actually update the row in the cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # with the values obtained from the search cursor &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode2 = countycode &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode2 = row[0]&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id += 1&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I get this error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PYTHON ERRORS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback Info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "D:\ArcGISData\SARS\Python_10April2013\BoundaryReporting_26March2013_changes_july2013_added_domain_changed_again.py", line 226, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Info:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;type 'exceptions.AttributeError'&amp;gt;: Object: Error in parsing arguments for AddMessage&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For this part:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; rows = arcpy.SearchCursor("Stewardship") &amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id = 1 &amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FFYtxt = row.getValue("FFY") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Countytxt = row.getValue("County")&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(Countytxt)&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; rowsffycounty = arcpy.UpdateCursor("Stewardship") &amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rowsffycounty: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FFYCounty = FFYtxt + "-" + Countytxt &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #FFYCountytxt = row.FFYCounty &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowsffycounty.updateRow(row) &amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id += 1 &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 19:53:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722522#M55948</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-07-16T19:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722523#M55949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First off, you are overwriting your cursor in the middle of iterating through it as well as your row objects, this will cause all sorts of problems. Additionally, your indentation is a little inconsistent, and creating a cursor for every row in another cursor is terribly inefficient.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 20:08:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722523#M55949</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-07-16T20:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722524#M55950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Mathew. So is it better to keep the two cursors separate? Is this better?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; srows = arcpy.SearchCursor("Countieslayer")

&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id = 1

&amp;nbsp;&amp;nbsp;&amp;nbsp; for srow in srows:


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # assign a variable for the value of srow.getValue("FIPS_TXT)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = srow.FIPS_TXT

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get a collection of rows for the update cursor


&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_id += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # create the update cursor
&amp;nbsp;&amp;nbsp;&amp;nbsp; urows = arcpy.UpdateCursor("Stewardship")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # cycle through the rows (in this case only 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # to actually update the row in the cursor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # with the values obtained from the search cursor
&amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urow.County = countycode
&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.updateRow(urow)


&amp;nbsp;&amp;nbsp;&amp;nbsp; del srow, srows, urow, urows #Clean up cursor objects
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722524#M55950</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2021-12-12T06:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722525#M55951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are better ways to accomplish what you are trying to do but you have the gist of it. Why do you have your obj_id counter? It doesn't seem to be used for anything in your code. For your two datasets "Countieslayer" and "Stewardship" do these both have just one row in them?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 20:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722525#M55951</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-07-16T20:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722526#M55952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It was just a counter variable, I should have called it something else. You are right, I don't even need the counter variable, since counties only has 1 record and the stewardship layer has many records but I run the tool with only one record selected. Thanks. What would be the best way to write these cursors and also how can use the da.cursors in this case? Thanks a lot!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; srows = arcpy.SearchCursor("Countieslayer")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for srow in srows:


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # assign a variable for the value of srow.getValue("FIPS_TXT)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = srow.FIPS_TXT

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # create the update cursor
&amp;nbsp;&amp;nbsp;&amp;nbsp; urows = arcpy.UpdateCursor("Stewardship")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urow.County = countycode

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.updateRow(urow)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722526#M55952</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2021-12-12T06:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722527#M55953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This could be one way of doing it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; countycode = tuple(arcpy.da.SearchCursor("Countieslayer", "FIPS_TXT"))[0][0] &amp;nbsp;&amp;nbsp;&amp;nbsp; urows = arcpy.da.UpdateCursor("Stewardship", "County") &amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urow[0] = countycode &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.updateRow(urow)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2013 21:26:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722527#M55953</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-07-16T21:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722528#M55954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Matthew. Now, why do I have to convert it to tuple if it is already returning a tuple? and what is the [0][0] for? thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 12:56:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722528#M55954</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-07-17T12:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722529#M55955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This line just takes the first row of the cursor without having to go through getting a row object. The cursor itself is a generator, which needs to be converted to a tuple to get the row values. The first [0] index is the first row, of which there should only be one anyway, the next [0] index is the first attribute, again of which there is only one, the FIPS_TXT field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;countycode = tuple(arcpy.da.SearchCursor("Countieslayer", "FIPS_TXT"))[0][0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 13:56:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722529#M55955</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-07-17T13:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: From arcpy.SearchCursor and arcpy.UpdateCursor to  arcpy.da.SearchCursor and arcp</title>
      <link>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722530#M55956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cool, thank you for the thorough explanation!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 16:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/from-arcpy-searchcursor-and-arcpy-updatecursor-to/m-p/722530#M55956</guid>
      <dc:creator>ionarawilson1</dc:creator>
      <dc:date>2013-07-17T16:01:36Z</dc:date>
    </item>
  </channel>
</rss>

