<?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: ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/1017292#M5433</link>
    <description>&lt;P&gt;This issue has been fixed in the&amp;nbsp; latest version of ArcGIS API for Python 1.8.3.&amp;nbsp; To verify, you could create an anaconda environment using the following command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;conda create -n arcgis183

activate arcgis183

conda install -c esri arcgis&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then launch jupyter notebook in the desired directory.&lt;/P&gt;
&lt;P&gt;code to verify:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from arcgis.gis import GIS
from arcgis.features import GeoAccessor, GeoSeriesAccessor
gis = GIS("https://geosaurus.maps.arcgis.com", "arcgis_python", "P@ssword123")

item=gis.content.get('d15eba5e9fe54a968e272c32d8e58e1f') #item has Date field
data = item.tables[0]
sdf = pd.DataFrame.spatial.from_layer(data)
sdf.head()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/82798"&gt;@PriyankaTuteja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Feb 2021 17:47:34 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-02-01T17:47:34Z</dc:date>
    <item>
      <title>ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865661#M4403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create a Spatially Enabled Data Frame object from a FeatureLayer object using the ArcGIS API for python version 1.5.3 and pandas version 0.24.1. When I use web layers that don't have date fields it works fine, but as soon as it has a date field it stops working and I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;Exception&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Could &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; load the dataset&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; dtype &lt;SPAN class="string token"&gt;'&amp;lt;class '&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="string token"&gt;'&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; understood&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied the code directly from the Introduction to the &lt;A href="https://developers.arcgis.com/python/guide/introduction-to-the-spatially-enabled-dataframe/" rel="nofollow noopener noreferrer" target="_blank"&gt;Spatially Enabled Data Frame&lt;/A&gt; guide page and just substituted the item id for one of my own web layers. Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS
gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://arcgis.com"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;**&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;**&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'The item id'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
flayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# create a Spatially Enabled DataFrame object&lt;/SPAN&gt;
sdf &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; pd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DataFrame&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatial&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;from_layer&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;flayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
sdf&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;head&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any ideas? Has anyone else run into this problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:45:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865661#M4403</guid>
      <dc:creator>BenjaminSperry1</dc:creator>
      <dc:date>2021-12-12T10:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865662#M4404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you might want to file an issue on their GitHub site as well&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-python-api" title="https://github.com/Esri/arcgis-python-api"&gt;GitHub - Esri/arcgis-python-api: Documentation and samples for ArcGIS API for Python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2019 17:53:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865662#M4404</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-02-12T17:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865663#M4405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There seems to be an underlying conflict between numpy and pandas... at least based on some forum crawling.&lt;/P&gt;&lt;P&gt;I was able to remedy the error by rolling back to pandas 0.23.4&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 18:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865663#M4405</guid>
      <dc:creator>MaxMarno</dc:creator>
      <dc:date>2019-03-26T18:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865664#M4406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a shame, especially since they deprecated the spatial dataframe and replaced it with the spatially enabled dataframe. Not only is it less idiomatic, but it produces this error (while the original SDF does not).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2019 20:37:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865664#M4406</guid>
      <dc:creator>WightmanAdmin</dc:creator>
      <dc:date>2019-12-09T20:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865665#M4407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ran into this issue.&amp;nbsp; Oddly enough the tool I have makes edits to a service and it fails if I start with an empty service or one that does not contain a feature that was created in AGOL or Pro.&amp;nbsp; Once I add a point that was created in AGOL or Pro I do not get the error anymore.&amp;nbsp; Not ideal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2020 15:13:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/865665#M4407</guid>
      <dc:creator>RobertWeber</dc:creator>
      <dc:date>2020-05-05T15:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for Python Spatially Enabled Data Frame broken with datetime fields</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/1017292#M5433</link>
      <description>&lt;P&gt;This issue has been fixed in the&amp;nbsp; latest version of ArcGIS API for Python 1.8.3.&amp;nbsp; To verify, you could create an anaconda environment using the following command:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;conda create -n arcgis183

activate arcgis183

conda install -c esri arcgis&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then launch jupyter notebook in the desired directory.&lt;/P&gt;
&lt;P&gt;code to verify:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from arcgis.gis import GIS
from arcgis.features import GeoAccessor, GeoSeriesAccessor
gis = GIS("https://geosaurus.maps.arcgis.com", "arcgis_python", "P@ssword123")

item=gis.content.get('d15eba5e9fe54a968e272c32d8e58e1f') #item has Date field
data = item.tables[0]
sdf = pd.DataFrame.spatial.from_layer(data)
sdf.head()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/82798"&gt;@PriyankaTuteja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 17:47:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-api-for-python-spatially-enabled-data-frame/m-p/1017292#M5433</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-01T17:47:34Z</dc:date>
    </item>
  </channel>
</rss>

