<?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: Script to turn errors into no data (Desktop 10.3) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311100#M24220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the result can return just the value of &lt;EM&gt;-99&lt;/EM&gt; instead of &lt;EM&gt;numerator/-99&lt;/EM&gt; if the denominator is 0. Rest seems perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2016 18:39:24 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2016-01-15T18:39:24Z</dc:date>
    <item>
      <title>Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311098#M24218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am running a field calculation which is [field A]/[field B].&amp;nbsp; Some of the values in field B are zero.&amp;nbsp; Is there a script I could use to turn results in the calculation where the denominator is zero into -99 instead of creating an error message?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 18:27:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311098#M24218</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-01-15T18:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311099#M24219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Codeblock:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def my_function(numerator, denominator):
&amp;nbsp; if denominator == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; denominator = -99
&amp;nbsp; return numerator/denominator&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;my_function( !YOUR_NUMERATOR_FIELD!, !YOUR_DENOMINATOR_FIELD! )&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:52:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311099#M24219</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T14:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311100#M24220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the result can return just the value of &lt;EM&gt;-99&lt;/EM&gt; instead of &lt;EM&gt;numerator/-99&lt;/EM&gt; if the denominator is 0. Rest seems perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 18:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311100#M24220</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2016-01-15T18:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311101#M24221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, sure, yes I missed that part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;def&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; my_function(numerator, denominator):&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; denominator == &lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;99&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;&amp;nbsp; else:&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; numerator/denominator&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:52:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311101#M24221</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T14:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311102#M24222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe I am messing up the syntax.&amp;nbsp; Here is what I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Codeblock:&lt;/P&gt;&lt;P&gt;def my_function(numerator, denominator):&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; if denominator == 0:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -99&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; else:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return numerator/denominator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRCHSCH = &lt;/P&gt;&lt;P&gt;my_function( [CHSCH04] , [TOSCH04] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still returning an error.&amp;nbsp;&amp;nbsp; Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 19:17:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311102#M24222</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-01-15T19:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311103#M24223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should have mentioned you need to use the Python parser with this example, although to be fair you did tag Python &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;. Field names should be enclosed in exclamation marks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 19:54:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311103#M24223</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2016-01-15T19:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311104#M24224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should have specified my level of experience with python.&amp;nbsp; The formula makes sense but I am still messing up the syntax and I have tried it several ways.&amp;nbsp; My fields are titled CHSCH04, which is the numerator, and TOSCH04, which is the denominator.&amp;nbsp; Can you please tell me exactly how to put those in your script and in the formula?&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 22:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311104#M24224</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-01-15T22:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311105#M24225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put this in the code block:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;def&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; my_function(numerator, denominator):&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; denominator == &lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; -&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;99&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;:&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; numerator/denominator &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;...and this in the expression below the code block:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;my_function(!&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;CHSCH04!,!&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;TOSCH04!&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;Make sure you've changed to the Python parser.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:52:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311105#M24225</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T14:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311106#M24226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was my problem.&amp;nbsp; I did not change to python.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there are no errors and those with no value in the denominator are coded as -99.&amp;nbsp; The calculation returns a value of only 1 or 0 though.&amp;nbsp; It is not rounding as only those values that should equal 1 are returning that.&amp;nbsp; Every other value below 1 returns a 0.&amp;nbsp; Additionally, the field is a float set to 6 decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 22:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311106#M24226</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-01-15T22:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311107#M24227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Additionally, when I switch back to VB and select a feature with values of 7 for CHSCH04 and 13 for TOSCH04 and enter the formula [CHSCH04] / [TOSCH04] it returns the correct value of 0.538462.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 23:04:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311107#M24227</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-01-15T23:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311108#M24228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, that's probably a function of integer/integer=integer. If you change one to float it should return a float (float/integer=float and integer/float=float):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;def&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; my_function(numerator, denominator):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; denominator == &lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; -&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;99&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; float(numerator)/denominator&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:52:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311108#M24228</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T14:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311109#M24229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did it.&amp;nbsp; Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 02:32:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311109#M24229</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-01-16T02:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311110#M24230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For simple cases like this, a Python &lt;A href="https://docs.python.org/2/reference/expressions.html#conditional-expressions"&gt;Conditional Expression &lt;/A&gt;can be used directly in the field expression box, removing the need for a code block:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14530586688854574 jive_text_macro" data-renderedposition="29_8_912_16" jivemacro_uid="_14530586688854574"&gt;&lt;P&gt;-99 if !TOSCH04! == 0 else float(!CHSCH04!)/!TOSCH04!&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2016 19:25:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311110#M24230</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-01-17T19:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script to turn errors into no data (Desktop 10.3)</title>
      <link>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311111#M24231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice.&amp;nbsp; Here is an additional step:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to code an additional field (CHPROPSC) with multiple missing values.&amp;nbsp; Essentially, if the value in PRCHSCH04 is -99 only then CHPROPSC = -98.&amp;nbsp; If the value in PRCHSCH13 is -99 only then CHPROPSC = -97.&amp;nbsp; If the value in both is -99 then CHPROPSC = -99.&amp;nbsp; Otherwise CHPROPSC = PRCHSCH13 - PRCHSCH04.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this but there was a processing failure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-97 if !PRCHSCH13! == -99 &amp;amp; !PRCHSCH04! &amp;lt;&amp;gt; -99&lt;/P&gt;&lt;P&gt;-98 elif !PRCHSCH13! &amp;lt;&amp;gt; -99 &amp;amp; !PRCHSCH04! == -99&lt;/P&gt;&lt;P&gt;-99 elif !PRCHSCH13! == -99 &amp;amp; !PRCHSCH04! == -99&lt;/P&gt;&lt;P&gt;else float( !PRCHSCH13! )- !PRCHSCH04!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice as to where the error is here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 04:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-to-turn-errors-into-no-data-desktop-10-3/m-p/311111#M24231</guid>
      <dc:creator>SteveCline</dc:creator>
      <dc:date>2016-02-03T04:59:06Z</dc:date>
    </item>
  </channel>
</rss>

