<?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: Can't create spatially enabled data frame from AGOL layer in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212349#M7747</link>
    <description>&lt;P&gt;I see this now and then. It's not about the layer itself, it's that a null value is being encountered when it expects an integer, and it's throwing an error.&lt;/P&gt;&lt;P&gt;Take a look at the data table, see if there are any fields where this might be happening.&lt;/P&gt;&lt;P&gt;If you want to work around this, try instead using &lt;STRONG&gt;bldg.query(as_df=True, out_fields=['subset', 'of', 'fields']) &lt;/STRONG&gt;to just pull what you need and potentially avoid the offending field.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 11:36:33 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2022-09-14T11:36:33Z</dc:date>
    <item>
      <title>Can't create spatially enabled data frame from AGOL layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212326#M7746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to convert an AGOL layer to a spatially enabled data frame, following the steps in&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/part2-data-io-reading-data/#read-in-web-feature-layers" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/python/guide/part2-data-io-reading-data/#read-in-web-feature-layers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I can access the AGOL item and its layers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HanliePetoors_0-1663147138204.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51129i0484D7259B026CA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HanliePetoors_0-1663147138204.png" alt="HanliePetoors_0-1663147138204.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I try to read one of them into a spatially enabled data frame, I get this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HanliePetoors_1-1663147248933.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51131iBF9809B83DD6828A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HanliePetoors_1-1663147248933.png" alt="HanliePetoors_1-1663147248933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The layer contains 3 features, it's not empty.&lt;/P&gt;&lt;P&gt;Does anyone know why this happens?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Hanlie&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:23:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212326#M7746</guid>
      <dc:creator>HanliePetoors</dc:creator>
      <dc:date>2022-09-14T09:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create spatially enabled data frame from AGOL layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212349#M7747</link>
      <description>&lt;P&gt;I see this now and then. It's not about the layer itself, it's that a null value is being encountered when it expects an integer, and it's throwing an error.&lt;/P&gt;&lt;P&gt;Take a look at the data table, see if there are any fields where this might be happening.&lt;/P&gt;&lt;P&gt;If you want to work around this, try instead using &lt;STRONG&gt;bldg.query(as_df=True, out_fields=['subset', 'of', 'fields']) &lt;/STRONG&gt;to just pull what you need and potentially avoid the offending field.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 11:36:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212349#M7747</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-09-14T11:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create spatially enabled data frame from AGOL layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212384#M7748</link>
      <description>&lt;P&gt;Hi Josh,&lt;/P&gt;&lt;P&gt;Thanks for the reply. I can now confirm that fields that have no value cause this error. When I use the query you suggested and only include fields that are mandatory and therefore do have values, the code works.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HanliePetoors_0-1663157550129.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51158i540F5C78428E5678/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HanliePetoors_0-1663157550129.png" alt="HanliePetoors_0-1663157550129.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I get around this? I want to place the attribute tables of all the layers in the feature service into one data frame that I then want to export to CSV. Obviously I can't predict which optional attributes will have values and which won't.&lt;/P&gt;&lt;P&gt;Can you suggest any options other than spatial data frames? I don't actually need the spatial abilities.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Hanlie&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 12:21:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212384#M7748</guid>
      <dc:creator>HanliePetoors</dc:creator>
      <dc:date>2022-09-14T12:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can't create spatially enabled data frame from AGOL layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212393#M7749</link>
      <description>&lt;P&gt;I found this pattern at&amp;nbsp;&lt;A href="http://geospatialtraining.com/tutorial-using-pandas-dataframes-with-the-arcgis-api-for-python/" target="_blank"&gt;http://geospatialtraining.com/tutorial-using-pandas-dataframes-with-the-arcgis-api-for-python/&lt;/A&gt;&amp;nbsp;and it doesn't seem to mind empty fields.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HanliePetoors_1-1663158736349.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51161i964DC89F3FEF78C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HanliePetoors_1-1663158736349.png" alt="HanliePetoors_1-1663158736349.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm going to try to complete my script using this approach.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Hanlie&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 12:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-t-create-spatially-enabled-data-frame-from/m-p/1212393#M7749</guid>
      <dc:creator>HanliePetoors</dc:creator>
      <dc:date>2022-09-14T12:33:35Z</dc:date>
    </item>
  </channel>
</rss>

