<?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 Fetching row using python script. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691215#M53558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any possible fetching row using Python script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Sep 2015 08:52:24 GMT</pubDate>
    <dc:creator>RajP</dc:creator>
    <dc:date>2015-09-14T08:52:24Z</dc:date>
    <item>
      <title>Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691215#M53558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any possible fetching row using Python script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 08:52:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691215#M53558</guid>
      <dc:creator>RajP</dc:creator>
      <dc:date>2015-09-14T08:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691216#M53559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the direct link to "searchcursor"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Fdesktop%2Flatest%2Fanalyze%2Farcpy-data-access%2Fsearchcursor-class.htm" rel="nofollow" target="_blank"&gt;http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-data-access/searchcursor-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There is a whole of lot of reading in the arcpy module, its classes and functions which should be read to put this in context.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 09:43:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691216#M53559</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-14T09:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691217#M53560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The last link is useful. But it is not clear my problem. I have attribute table that have Name and Grid no field. I have to update Name field using Grid no. For Example in the Grid Field (Grid1, Grid2, Gird2, Grid1, Grid1) so I have update Name field like as (Grid1_001, Grid2_001, Grid2_002, Grid1_002, Grid1_003). Kindly suggest me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 12:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691217#M53560</guid>
      <dc:creator>RajP</dc:creator>
      <dc:date>2015-09-14T12:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691218#M53561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try searching for arcpy.da.UpdateCursor that will get you where you want to go&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 12:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691218#M53561</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-09-14T12:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691219#M53562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have another column which contains the "001", "002" or perhaps just the number, you could probably just do a concatenation with the field calculator.&lt;/P&gt;&lt;P&gt;If you havn't got this second field, what governs the "001", "002" part connecting to "Grid1" etc?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 13:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691219#M53562</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2015-09-14T13:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691220#M53563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it might be useful to provide a screen grab (or equivalent) which shows the table that you have to see whether search/update cursors are needed or simply a field calculation with concatenation from existing fields, is needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 13:20:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691220#M53563</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-14T13:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691221#M53564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no column which contains the "001", "002". &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 06:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691221#M53564</guid>
      <dc:creator>RajP</dc:creator>
      <dc:date>2015-09-15T06:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691222#M53565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Show the fields you have.&amp;nbsp; It is not clear whether you want to add new fields, or change the name of existing fields.&amp;nbsp; In both cases, emulate the code in.&lt;/P&gt;&lt;P&gt;Add &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Fdesktop%2Flatest%2Ftools%2Fdata-management-toolbox%2Fadd-field.htm" rel="nofollow" target="_blank"&gt;http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/add-field.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Alter/Rename&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fdesktop.arcgis.com%2Fen%2Fdesktop%2Flatest%2Ftools%2Fdata-management-toolbox%2Falter-field-properties.htm" rel="nofollow" target="_blank"&gt;http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/alter-field-properties.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 06:09:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691222#M53565</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-15T06:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691223#M53566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly you could use following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cursor = arcpy.UpdateCursor("testFC")
gridDict = {}


for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print row.getValue("GridNo")
&amp;nbsp;&amp;nbsp;&amp;nbsp; gridNo = row.getValue("GridNo")


&amp;nbsp;&amp;nbsp;&amp;nbsp; if(gridDict.has_key(gridNo)):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gridDict[gridNo] = gridDict[gridNo] + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gridDict[gridNo] = 1


&amp;nbsp;&amp;nbsp;&amp;nbsp; name = "{0}_{1}".format(gridNo, str(gridDict[gridNo]).zfill(3))
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue("Name",name)
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure to correct the feature class path and field names as they are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mahtab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:05:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691223#M53566</guid>
      <dc:creator>MahtabAlam1</dc:creator>
      <dc:date>2021-12-12T05:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691224#M53567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanking you so much. It was very useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had created the Python toolbox. Is there any possible to hide our source in the Python toolbox.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 06:25:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691224#M53567</guid>
      <dc:creator>RajP</dc:creator>
      <dc:date>2015-09-16T06:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fetching row using python script.</title>
      <link>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691225#M53568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid you can't do this. Search for python obfuscation and you will get the answer. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 13:17:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/fetching-row-using-python-script/m-p/691225#M53568</guid>
      <dc:creator>MahtabAlam1</dc:creator>
      <dc:date>2015-09-16T13:17:02Z</dc:date>
    </item>
  </channel>
</rss>

