<?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: Spatial data frame failing to output as feature class in ArcGIS Notebooks Questions</title>
    <link>https://community.esri.com/t5/arcgis-notebooks-questions/spatial-data-frame-failing-to-output-as-feature/m-p/1169048#M517</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/93289"&gt;@MicahJohns&lt;/a&gt;&amp;nbsp;I don't see the import statements in your example above, so not sure how it was defined. can you try adding:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.features import GeoAccessor&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 28 Apr 2022 20:50:20 GMT</pubDate>
    <dc:creator>RaviNarayanan</dc:creator>
    <dc:date>2022-04-28T20:50:20Z</dc:date>
    <item>
      <title>Spatial data frame failing to output as feature class</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/spatial-data-frame-failing-to-output-as-feature/m-p/1150249#M488</link>
      <description>&lt;P&gt;My ultimate goal is this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Start with a CSV&lt;/LI&gt;&lt;LI&gt;Turn that CSV into a spatial data frame&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#FF0000"&gt;Turn that spatial data frame into a feature layer - &lt;U&gt;&lt;STRONG&gt;This is where I'm failing&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Append the data from that feature layer to another existing hosted feature layer&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;&lt;/U&gt; works fine.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;df = pd.read_csv("/arcgis/home/Chicago Homicide csv.csv")

#specifically changes a column to date and time
df['Date'] = pd.to_datetime(df['Date'])
#df.dtypes
df.head()&lt;/LI-CODE&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;/U&gt; also works fine&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#makes a sdf and specifies the xy coord columns
sdf = GeoAccessor.from_xy(df,'Longitude','Latitude')
#df.dtypes

sdf.head()
sdf.spatial.plot()&lt;/LI-CODE&gt;&lt;P&gt;This is the third and failing step&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sdf.spatial.to_featureLayer('sdf_to_featureLayer')

#this is the resulting error
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_393/3728460398.py in &amp;lt;module&amp;gt;
----&amp;gt; 1 sdf.spatial.to_featureLayer('spf_to_featureLayer')

AttributeError: 'GeoAccessor' object has no attribute 'to_featureLayer'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been up and down forums in search of a solution, I actually used the answers &lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/export-dataframe-to-table/td-p/1019327" target="_blank" rel="noopener"&gt;from this post&lt;/A&gt;&amp;nbsp;(ESRI community link) to get to where I am.&lt;/P&gt;&lt;P&gt;Any thoughts are much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 17:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/spatial-data-frame-failing-to-output-as-feature/m-p/1150249#M488</guid>
      <dc:creator>MicahJohns</dc:creator>
      <dc:date>2022-03-03T17:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial data frame failing to output as feature class</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/spatial-data-frame-failing-to-output-as-feature/m-p/1169048#M517</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/93289"&gt;@MicahJohns&lt;/a&gt;&amp;nbsp;I don't see the import statements in your example above, so not sure how it was defined. can you try adding:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.features import GeoAccessor&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 20:50:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/spatial-data-frame-failing-to-output-as-feature/m-p/1169048#M517</guid>
      <dc:creator>RaviNarayanan</dc:creator>
      <dc:date>2022-04-28T20:50:20Z</dc:date>
    </item>
  </channel>
</rss>

