<?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: Need arcpy.SearchCursor to return full row value in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3227#M285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome! Glad it worked for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2016 19:25:13 GMT</pubDate>
    <dc:creator>AlexanderBrown5</dc:creator>
    <dc:date>2016-08-23T19:25:13Z</dc:date>
    <item>
      <title>Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3222#M280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table in a geodatabase that includes an attribute field type Double called lab_calib_chlorophyll.&lt;/P&gt;&lt;P&gt;Scrolling through the table in ArcMap, I see values which contain anywhere from 2 to 6 decimal places with the default numeric property&amp;nbsp;setting (of 6 decimal places).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I change the numeric properties of the column to show up to 15 decimal places, some of the values in the table extend out, and others&amp;nbsp;don't (presumably because a given value does not contain that many decimal places).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still in ArcMap, I then use Select by Attributes and construct a SQL&amp;nbsp;statement. I populate the value using the "Get Unique Values" button. I then scroll through the&amp;nbsp;list that results and find the unique value I want which appears in the unique values list as 26.427265000000006 even though&amp;nbsp;when looking at the table itself this only shows up as 26.427265 (even when the properties are set to show 15 decimal places).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trouble is that I need to use arcpy.da.SeachCursor(table,"*") to build an SQL expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The search cursor for a specific row is returning the 26.427265 and not the "true" 26.427265000000006, therefore the expression that is built does not return a selected record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get the search cursor to return the complete value that is "really" in the table row&amp;nbsp;so that my SQL expression becomes&amp;nbsp;lab_calib_chlorophyll = 26.427265000000006&lt;/P&gt;&lt;P&gt;and not&lt;/P&gt;&lt;P&gt;lab_calib_chlorophyll = 26.427265&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 14:41:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3222#M280</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2016-08-23T14:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3223#M281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to forgo my comments, at least for now, on "really" and "true."&amp;nbsp; Before I dive into the mechanics, what version of ArcMap/ArcCatalog are you running?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 15:13:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3223#M281</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-08-23T15:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3224#M282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lynn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without going into a full discussion into precision/scale and number types for ArcGIS...I would&amp;nbsp;add a format function to your cursor variable for that field. &amp;nbsp;I created a test table and added your value as a Field Type Double. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran a search cursor on my test table. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I print the entire row:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; row

&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;26.427265000000006&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;75.24637681199994&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;72.53623188400007&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if I print just my second field's value:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="number token"&gt;26.427265&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you try:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'.15f'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;# give 15 digits after the point&lt;/SPAN&gt;

&lt;SPAN class="number token"&gt;26.427265000000006&lt;/SPAN&gt;‍‍‍‍&amp;nbsp; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great resource:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.python.org/3/tutorial/floatingpoint.html" title="https://docs.python.org/3/tutorial/floatingpoint.html" rel="nofollow noopener noreferrer" target="_blank"&gt;15. Floating Point Arithmetic: Issues and Limitations — Python 3.5.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Probably the quickest way to return the values you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:08:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3224#M282</guid>
      <dc:creator>AlexanderBrown5</dc:creator>
      <dc:date>2021-12-10T20:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3225#M283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much - this worked perfectly! &amp;nbsp;And very helpful to have the reference to the documentation.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 18:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3225#M283</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2016-08-23T18:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3226#M284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you - I am running 10.4.1&lt;/P&gt;&lt;P&gt;Alexander Brown's method to add a format function worked so I am all set. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 18:44:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3226#M284</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2016-08-23T18:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3227#M285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome! Glad it worked for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 19:25:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3227#M285</guid>
      <dc:creator>AlexanderBrown5</dc:creator>
      <dc:date>2016-08-23T19:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3228#M286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But still...&lt;/P&gt;&lt;P&gt;I think it is unwise to be using a select or unique&amp;nbsp;classify on a attribute which is double. There must be a better way to identify the row you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 19:56:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3228#M286</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2016-08-23T19:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3229#M287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There probably is but as a python newbie I could not figure it out. &amp;nbsp;Would love any advice that would make it more efficient if anyone has a moment. &amp;nbsp;And maybe there is even an existing GP tool that I am overlooking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have several hundred tables. &amp;nbsp;Each table represents measurements&amp;nbsp;recorded on a specific date. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each row in a given table represents a measurement of chlorophyll at a specific monitoring station (Station) and depth (negdepth_m). &amp;nbsp;Station repeats itself. &amp;nbsp;Here is a snapshot of one of my tables:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/217426_table_sample.png" style="width: 620px; height: 658px;" /&gt;&lt;/P&gt;&lt;P&gt;For each&amp;nbsp;table, I need to determine the Maximum Chlorophyll that occurs at any given Station.&lt;/P&gt;&lt;P&gt;I found this is easy to accomplish using&amp;nbsp;arcpy.Statistics_analysis with Station as the Case Field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.Statistics_analysis(in_table, out_table, statistics_fields="lab_calib_chlorophyll MAX", case_field="Station")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, for each Max Chlorophyll value for each Station, I also need to retain and write out&amp;nbsp;the negdepth_m at which that Maximum lab_calib_chlorophyll value was measured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/217463_table_sample2.png" style="width: 620px; height: 277px;" /&gt;&lt;/P&gt;&lt;P&gt;Perhaps the Statisitcs_analysis tool is somehow tracking the other fields present as it finds the MAX, but I could not find a way to expose and write out the corresponding negdepth_m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I resorted to generating an expression using a search cursor: &amp;nbsp;eg&lt;/P&gt;&lt;P&gt;Station = BBT1 and MAX_lab_calib_chlorophyll = 18.96339&amp;nbsp;&lt;/P&gt;&lt;P&gt;which would then select and tag the matching record back in the original table (maxtag = y).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/217464_table_sample3.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is where I ran into trouble because in many cases MAX_lab_chlorophyll had 15 digits after the decimal&amp;nbsp;18.963390000000006 so the expression did not result in a selected record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any techniques that would make this easier if you have a moment to explain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 21:05:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3229#M287</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2016-08-23T21:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3230#M288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use a bit of python to get the ID (your identifer or &lt;A href="mailto:OID@)" rel="nofollow noopener noreferrer" target="_blank"&gt;OID@)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dummy table of data.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/217456_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;flds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Station"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"ChloroVal"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SelFlag"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# read the data into a dict containing a list&lt;/SPAN&gt;
data_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tbl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; flds&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; inCur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; inCur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; ID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; station &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; val &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;val&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; ID&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; station &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; data_dict&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;station&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;data&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;station&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;data&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;data_dict looks like this :&lt;/P&gt;&lt;P&gt;{u'B1': [[5.4, 1], [3.4, 2], [6.4, 3], [5.0, 4]],&lt;BR /&gt; u'B2': [[3.2, 5], [5.2, 6], [5.0, 7], [7.0, 8]]}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you read through this dict and sort each list.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# process the dict to get the ID where Val is max, just sort each one&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; k&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; v &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; data_dict&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;items&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 v &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sorted&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;v&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 data_dict&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;k&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; v&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sorted list looks like this :&lt;/P&gt;&lt;P&gt;{u'B1': [[3.4, 2], [5.0, 4], [5.4, 1], [6.4, 3]],&lt;BR /&gt; u'B2': [[3.2, 5], [5.0, 7], [5.2, 6], [7.0, 8]]}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now all you need is the ID associated with the last member of the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;updateList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; k&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; v &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; data_dict&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;items&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;# pick the last one in each list&lt;/SPAN&gt;
 updateList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;v&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then with updateList, open up an update cursor and set the selectFlag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:08:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3230#M288</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2021-12-10T20:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3231#M289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mr. Ayres,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so very much for putting this together. &amp;nbsp;I am not too familiar with data dictionaries yet, so this will be a great way for me to learn about them.&lt;/P&gt;&lt;P&gt;I am going to study this code and make sure I understand how it is working. I expect it will be applicable to future applications as well and I really appreciate your taking the time to help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2016 16:03:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3231#M289</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2016-08-24T16:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need arcpy.SearchCursor to return full row value</title>
      <link>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3232#M290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No probs. Good luck. Happy pythoning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 06:41:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/need-arcpy-searchcursor-to-return-full-row-value/m-p/3232#M290</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2016-08-25T06:41:16Z</dc:date>
    </item>
  </channel>
</rss>

