<?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: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015668#M5409</link>
    <description>&lt;P&gt;Wow, completely missed this. Mondays. Thanks Mike, really appreciate it.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2021 18:33:07 GMT</pubDate>
    <dc:creator>EricSamson1</dc:creator>
    <dc:date>2021-01-11T18:33:07Z</dc:date>
    <item>
      <title>Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015631#M5406</link>
      <description>&lt;P&gt;I have created a script tool that cleans up the input feature class using pandas, through utilizing the spatial dataframe functionality. I created it months ago, and it seemed to work fine then. Coming back to it now, however, I have noticed that when saving the output feature class using the .spatial.to_featureclass() function, the feature class field names go from capital letters to lower case letters, and adds underscores to certain fields not previously containing spaces.&lt;/P&gt;&lt;P&gt;Examples (original =&amp;gt; output):&lt;/P&gt;&lt;P&gt;SimplifiedEXAMPLEStatus =&amp;gt; simplified_example_status&lt;/P&gt;&lt;P&gt;GlobalID =&amp;gt; global_id&lt;/P&gt;&lt;P&gt;VIdeo_Complete =&amp;gt; v_ideo_complete&lt;/P&gt;&lt;P&gt;VideoRecord =&amp;gt; video_record&lt;/P&gt;&lt;P&gt;Obviously, this creates a lot of problems when trying to work with the data further. It seems like the function doesn't like when random capital letters are thrown into a field name. I tried to recreate the problem in an ArcGIS notebook and experienced the same output problem, but before running the .spatial.to_featureclass() function, I examined the dataframe and found that the fields were in proper form. So the problem seems to be occurring during the export function. I couldn't find any details online about this problem so wanted to post here to see if others have experienced this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 17:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015631#M5406</guid>
      <dc:creator>EricSamson1</dc:creator>
      <dc:date>2021-01-11T17:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015663#M5408</link>
      <description>&lt;P&gt;Looks like the GeoAccessor to_featureclass() call has a 'sanitize_columns' param that default to true.&amp;nbsp; &amp;nbsp;Elsewhere it looks like the sanitize routine clobbers camelcase to create snake case.&amp;nbsp; &amp;nbsp;Hopefully setting that param to False will work and be trouble free.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.GeoAccessor.to_featureclass" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html#arcgis.features.GeoAccessor.to_featureclass&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 18:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015663#M5408</guid>
      <dc:creator>MikeSlattery</dc:creator>
      <dc:date>2021-01-11T18:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015668#M5409</link>
      <description>&lt;P&gt;Wow, completely missed this. Mondays. Thanks Mike, really appreciate it.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 18:33:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1015668#M5409</guid>
      <dc:creator>EricSamson1</dc:creator>
      <dc:date>2021-01-11T18:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1088386#M6479</link>
      <description>&lt;P&gt;This must have been introduced in version 1.9.&amp;nbsp; Not sure why they thought modifying column names automatically was a good idea.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 13:31:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1088386#M6479</guid>
      <dc:creator>JohnHuillery1</dc:creator>
      <dc:date>2021-08-12T13:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1088520#M6482</link>
      <description>&lt;P&gt;I agree, it doesn't make a lot of sense. If someone wanted their column names changed...wouldn't they just do that themselves? I can't see any positive for it&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 16:32:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1088520#M6482</guid>
      <dc:creator>EricSamson1</dc:creator>
      <dc:date>2021-08-12T16:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1114586#M6795</link>
      <description>&lt;P&gt;Thanks for the solution on this, setting 'sanitize_columns' to 'False' worked for me.&lt;/P&gt;&lt;P&gt;Certainly doesn't make sense to me since it first modifies the dataframe and not just the feature class that is being written to. Took me a little while to figure out what was changing the case of my field names.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 17:38:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1114586#M6795</guid>
      <dc:creator>JimmyKnowles</dc:creator>
      <dc:date>2021-11-05T17:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using the df.spatial.to_featureclass() causes the feature class to lose field name formatting</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1140106#M7073</link>
      <description>&lt;P&gt;Today was the first time I tried the .spatial.to_featureclass feature with the same results you had.&amp;nbsp; I tried the sanitze_columns=False option but get the same results, i.e., lower case columns with underscores inserted occasionally.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the code below am I missing something -- no errors returned? Or something else to try?&lt;/P&gt;&lt;P&gt;df_fc.spatial.to_featureclass(out_fc, overwrite=True, sanitize_columns=False)&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 22:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/using-the-df-spatial-to-featureclass-causes-the/m-p/1140106#M7073</guid>
      <dc:creator>MichaelKnowles</dc:creator>
      <dc:date>2022-02-02T22:29:18Z</dc:date>
    </item>
  </channel>
</rss>

