<?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: Trying to create a feature layer from a pandas dataframe in ArcGIS Notebooks Questions</title>
    <link>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162112#M29</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again Asaf!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect there's an issue with the dataframe being passed in. Have you verified that the dataframe is valid and being imported correctly? When you call&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;groups_stats_fc does it return &amp;lt;FeatureCollection&amp;gt;? You&amp;nbsp;should also verify that&amp;nbsp;&lt;SPAN&gt;groups_stats_fc_dict&amp;nbsp;is valid.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Here's some more info on the import_data method:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.import_data" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.import_data"&gt;arcgis.gis module — arcgis 1.8.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Oct 2020 23:24:16 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-10-30T23:24:16Z</dc:date>
    <item>
      <title>Trying to create a feature layer from a pandas dataframe</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162111#M28</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am trying to follow the &lt;A href="https://developers.arcgis.com/python/guide/accessing-and-creating-content/"&gt;documentation&lt;/A&gt;&amp;nbsp;to convert a dataframe into a feature collection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I am using:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;groups_stats_fc=gis.content.import_data(df)&lt;/P&gt;&lt;P&gt;import json&lt;BR /&gt;groups_stats_fc_dict = dict(groups_stats_fc.properties)&lt;BR /&gt;groups_stats_fc_json = json.dumps({"featureCollection": {"layers": [groups_stats_fc_dict]}})&lt;BR /&gt;groups_stats_fc_json&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;groups_stats_item_properties = {'title': 'AGOL Group Statistics',&lt;BR /&gt; 'description':'AGOL Group Statistics' ,&lt;BR /&gt; 'tags': 'arcgis ,python, api, pandas, csv',&lt;BR /&gt; 'text':groups_stats_fc_json,&lt;BR /&gt; 'type':'Feature Collection'}&lt;BR /&gt;group_stats_item = gis.content.add(groups_stats_item_properties)&lt;BR /&gt;group_stats_item&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The item is created but when I try to access it nothing shows up...&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/512149_pastedImage_1.png" /&gt;&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, 30 Oct 2020 20:47:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162111#M28</guid>
      <dc:creator>AsafEvenPaz</dc:creator>
      <dc:date>2020-10-30T20:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a feature layer from a pandas dataframe</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162112#M29</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again Asaf!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect there's an issue with the dataframe being passed in. Have you verified that the dataframe is valid and being imported correctly? When you call&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;groups_stats_fc does it return &amp;lt;FeatureCollection&amp;gt;? You&amp;nbsp;should also verify that&amp;nbsp;&lt;SPAN&gt;groups_stats_fc_dict&amp;nbsp;is valid.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Here's some more info on the import_data method:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.import_data" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.import_data"&gt;arcgis.gis module — arcgis 1.8.2 documentation&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2020 23:24:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162112#M29</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-10-30T23:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a feature layer from a pandas dataframe</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162113#M30</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dataframe seems to be valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I call the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;groups_stats_fc it returns &amp;lt;FeatureCollection&amp;gt; and the&amp;nbsp;&lt;SPAN&gt;groups_stats_fc_dict seems to be valid as well:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/512487_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;Any other ideas?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2020 16:02:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/162113#M30</guid>
      <dc:creator>AsafEvenPaz</dc:creator>
      <dc:date>2020-11-04T16:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create a feature layer from a pandas dataframe</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/1049312#M283</link>
      <description>&lt;P&gt;In the last line, call:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;group_stats_item.publish()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This should make it vieweable on maps in ArcGIS Online.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 18:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/trying-to-create-a-feature-layer-from-a-pandas/m-p/1049312#M283</guid>
      <dc:creator>DanCostello</dc:creator>
      <dc:date>2021-04-20T18:48:22Z</dc:date>
    </item>
  </channel>
</rss>

