<?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 Python question regarding Null Values in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639246#M49832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to calculate a field within a model builder process, and I am getting returns I was not expecting. I am trying to have the Null values calculated as 0s (Number field). Now, the non-Null values are being calculated to 0s and leaving the Null values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2015 15:02:40 GMT</pubDate>
    <dc:creator>MattFolley__DOIT_</dc:creator>
    <dc:date>2015-01-29T15:02:40Z</dc:date>
    <item>
      <title>Python question regarding Null Values</title>
      <link>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639246#M49832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Trying to calculate a field within a model builder process, and I am getting returns I was not expecting. I am trying to have the Null values calculated as 0s (Number field). Now, the non-Null values are being calculated to 0s and leaving the Null values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 15:02:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639246#M49832</guid>
      <dc:creator>MattFolley__DOIT_</dc:creator>
      <dc:date>2015-01-29T15:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python question regarding Null Values</title>
      <link>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639247#M49833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably need to add an else in there and check for the field equals &amp;lt;null&amp;gt;. Something like:&lt;/P&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;nullfill(!FREQUENCY!)&lt;/PRE&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 nullfill(value):
&amp;nbsp;&amp;nbsp;&amp;nbsp; if value == None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return value&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639247#M49833</guid>
      <dc:creator>VandanaRaghunathan</dc:creator>
      <dc:date>2021-12-12T03:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python question regarding Null Values</title>
      <link>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639248#M49834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick! Thank you for the help. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2015 18:55:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-question-regarding-null-values/m-p/639248#M49834</guid>
      <dc:creator>MattFolley__DOIT_</dc:creator>
      <dc:date>2015-01-29T18:55:55Z</dc:date>
    </item>
  </channel>
</rss>

