<?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 edit_features null values becoming 0s in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036187#M60384</link>
    <description>&lt;P&gt;I am trying to use edit_features to update a hosted table with data from a pandas dataframe. The process runs without error, but the null values in the dataframe are automatically converted to 0s in the table as shown below. Is there a way to prevent this because 0s in these fields have an inherent meaning and they should be missing, not 0.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackWood_0-1615593086046.png" style="width: 678px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8365iE08EFCD2D767EB6B/image-dimensions/678x368?v=v2" width="678" height="368" role="button" title="MackWood_0-1615593086046.png" alt="MackWood_0-1615593086046.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackWood_1-1615593090694.png" style="width: 674px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8366i4D09522E7E96CF37/image-dimensions/674x149?v=v2" width="674" height="149" role="button" title="MackWood_1-1615593090694.png" alt="MackWood_1-1615593090694.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 23:54:58 GMT</pubDate>
    <dc:creator>MackWood</dc:creator>
    <dc:date>2021-03-12T23:54:58Z</dc:date>
    <item>
      <title>edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036187#M60384</link>
      <description>&lt;P&gt;I am trying to use edit_features to update a hosted table with data from a pandas dataframe. The process runs without error, but the null values in the dataframe are automatically converted to 0s in the table as shown below. Is there a way to prevent this because 0s in these fields have an inherent meaning and they should be missing, not 0.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackWood_0-1615593086046.png" style="width: 678px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8365iE08EFCD2D767EB6B/image-dimensions/678x368?v=v2" width="678" height="368" role="button" title="MackWood_0-1615593086046.png" alt="MackWood_0-1615593086046.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackWood_1-1615593090694.png" style="width: 674px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8366i4D09522E7E96CF37/image-dimensions/674x149?v=v2" width="674" height="149" role="button" title="MackWood_1-1615593090694.png" alt="MackWood_1-1615593090694.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 23:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036187#M60384</guid>
      <dc:creator>MackWood</dc:creator>
      <dc:date>2021-03-12T23:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036210#M60385</link>
      <description>&lt;P&gt;strange, but the second table looks like the values are a text representation of integers (left justified, with the floats converted to integer).&lt;/P&gt;&lt;P&gt;NaN only applies to floats, there is no NaN for integers, the normal procedure is to assign an integer that can't exist in the data set (smallest negative or positive integers are often used).&lt;/P&gt;&lt;P&gt;So in short, if conversion to integer was done (inadvertantly or not), ... 0 .... is the substitute in the absence or other rules of&lt;/P&gt;</description>
      <pubDate>Sat, 13 Mar 2021 00:42:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036210#M60385</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-13T00:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036668#M60407</link>
      <description>&lt;P&gt;This is the output I am trying to get. When I append data manually using a csv file I am able to get the nulls. These values are stored as integers in the hosted table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackWood_0-1615823760031.png" style="width: 686px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8484i180E7E3DB42DC8E0/image-dimensions/686x211?v=v2" width="686" height="211" role="button" title="MackWood_0-1615823760031.png" alt="MackWood_0-1615823760031.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackWood_1-1615823784102.png" style="width: 726px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8485i07379D003B36A058/image-dimensions/726x423?v=v2" width="726" height="423" role="button" title="MackWood_1-1615823784102.png" alt="MackWood_1-1615823784102.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 15:57:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036668#M60407</guid>
      <dc:creator>MackWood</dc:creator>
      <dc:date>2021-03-15T15:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036673#M60409</link>
      <description>&lt;P&gt;As indicated, there is no "null" for integers, they are converted to "0" by default, so my suggestion stands about using a value that can't possibly exist in your data set (eg -9999999 or whatever), then deal with the null-replicants as you see fit.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 16:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036673#M60409</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-15T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036674#M60410</link>
      <description>&lt;P&gt;How does the current hosted table have nulls as integers?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 16:04:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036674#M60410</guid>
      <dc:creator>MackWood</dc:creator>
      <dc:date>2021-03-15T16:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036678#M60411</link>
      <description>&lt;P&gt;they are handled internally ... masking if you will, just like they are in ArcGIS Pro. There are real NaNs for floats, just not integers.&amp;nbsp; Your first table has the columns as floats in the dataframe, hence NaNs, your second table is integers hence no NaNs (NaInt not an integer doesn't exist)&lt;/P&gt;&lt;P&gt;So either make sure that they are floats on transfer, deal with the zeros or exclude the records that are NaN is pretty well your options&lt;/P&gt;&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/NaN" target="_blank"&gt;NaN - Wikipedia&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 16:14:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036678#M60411</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-15T16:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: edit_features null values becoming 0s</title>
      <link>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036682#M60412</link>
      <description>&lt;P&gt;Gotcha, I will try to figure out how to have the python script mask them as they are handled when manually updating then. Because the maps that are pointing to this data use the missing values as a specific symbology for census tracts with no data and I'm trying to not have to mess with the map too much.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 16:18:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/edit-features-null-values-becoming-0s/m-p/1036682#M60412</guid>
      <dc:creator>MackWood</dc:creator>
      <dc:date>2021-03-15T16:18:14Z</dc:date>
    </item>
  </channel>
</rss>

