<?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 reclassify a field with field calculator using python problem in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3013#M252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to reclassify a column using the field calculator and python. i am basically using the script i found on the arcgis10 help page. when i am running the field calculator, everything goes fine and i get no error messages (see the script below).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the original column contains values between 0 and 1 and the type is double.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my problem is that the reclassification won't work. this means that every field in the new column is populated with "very low" instead of the matching classification. so the result is that i have a column where every field contains "very low"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am still new to python and i hope anybody can help me with this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks a lot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thomas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def reclass(ICISS):
&amp;nbsp; if (ICISS &amp;gt;= 0 and ICISS &amp;lt;= 0,4):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "very low"
&amp;nbsp; elif (ICISS &amp;gt; 0,4 and ICISS &amp;lt;= 0,6):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "medium low"
&amp;nbsp; elif (ICISS &amp;gt; 0,6 and ICISS &amp;lt;= 0,8):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "medium high"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "very high"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Sep 2011 16:24:41 GMT</pubDate>
    <dc:creator>ThomasJakubicka</dc:creator>
    <dc:date>2011-09-21T16:24:41Z</dc:date>
    <item>
      <title>reclassify a field with field calculator using python problem</title>
      <link>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3013#M252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to reclassify a column using the field calculator and python. i am basically using the script i found on the arcgis10 help page. when i am running the field calculator, everything goes fine and i get no error messages (see the script below).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the original column contains values between 0 and 1 and the type is double.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my problem is that the reclassification won't work. this means that every field in the new column is populated with "very low" instead of the matching classification. so the result is that i have a column where every field contains "very low"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i am still new to python and i hope anybody can help me with this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks a lot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thomas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def reclass(ICISS):
&amp;nbsp; if (ICISS &amp;gt;= 0 and ICISS &amp;lt;= 0,4):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "very low"
&amp;nbsp; elif (ICISS &amp;gt; 0,4 and ICISS &amp;lt;= 0,6):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "medium low"
&amp;nbsp; elif (ICISS &amp;gt; 0,6 and ICISS &amp;lt;= 0,8):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "medium high"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "very high"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 16:24:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3013#M252</guid>
      <dc:creator>ThomasJakubicka</dc:creator>
      <dc:date>2011-09-21T16:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: reclassify a field with field calculator using python problem</title>
      <link>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3014#M253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm going to guess that this has to do with using a comma as the decimal point, and interpretting 0,4 as 4. Try replacing all of the commas with a period. Does your numerical column use commas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 17:48:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3014#M253</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2011-09-21T17:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: reclassify a field with field calculator using python problem</title>
      <link>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3015#M254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your Class field formatted with a ',' or a '.' for the decimal?&amp;nbsp; Try the following instead:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def reclass(ICISS):
&amp;nbsp; if (ICISS &amp;gt;= 0 and ICISS &amp;lt;= 0.4):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "very low"
&amp;nbsp; elif (ICISS &amp;gt; 0.4 and ICISS &amp;lt;= 0.6):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "medium low"
&amp;nbsp; elif (ICISS &amp;gt; 0.6 and ICISS &amp;lt;= 0.8):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "medium high"
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; return "very high"&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:07:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3015#M254</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T20:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: reclassify a field with field calculator using python problem</title>
      <link>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3016#M255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;great that worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for the quick help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2011 10:45:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reclassify-a-field-with-field-calculator-using/m-p/3016#M255</guid>
      <dc:creator>ThomasJakubicka</dc:creator>
      <dc:date>2011-09-22T10:45:37Z</dc:date>
    </item>
  </channel>
</rss>

