<?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: Join a pandas dataframe to feature class table by matching column in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1222624#M7917</link>
    <description>&lt;P&gt;Here is code sketch&lt;/P&gt;&lt;P&gt;arcpy.management.AddField('MyFeatureClass','NewFC_Field')&lt;/P&gt;&lt;P&gt;fields =['&lt;SPAN&gt;ecoregion_name',&amp;nbsp;&lt;/SPAN&gt;'NewFC_Field']&lt;/P&gt;&lt;P&gt;with arcpy.da.UpdateCursor('MyFeatureClass','fields) as cursor:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;for row in cursor:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row[1] = Dataframe[Dataframe['ecoregion_name' == row[0]]['DataframeFieldToTransfer']&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cursor.updateRow(row)&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 20:15:07 GMT</pubDate>
    <dc:creator>DavidAnderson_1701</dc:creator>
    <dc:date>2022-10-17T20:15:07Z</dc:date>
    <item>
      <title>Join a pandas dataframe to feature class table by matching column</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1200208#M7914</link>
      <description>&lt;P&gt;Hello there. I have a pandas dataframe and a feature class. The rows of each relate to a set of ecoregions and ecoregions are named in the same way in the "ecoregion_name" column of each. I would like to append, join, insert cursor, or what have you the dataframe to the feature class.&lt;/P&gt;&lt;P&gt;I do not believe that the "arcpy.management.AddJoin" tool supports dataframes. Does it support csv files by chance?&lt;/P&gt;&lt;P&gt;I have also tried using "update cursor" . The issue I encountered here was being unable to access the value of the join field within the "row" for each for loop iteration, so that I could write a conditional statement which made the match happen between the two join columns.&lt;/P&gt;&lt;P&gt;Is there a concise way of doing this without too much data conversion and code that I am missing? Any solution is very appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 14:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1200208#M7914</guid>
      <dc:creator>MaxDuso</dc:creator>
      <dc:date>2022-08-07T14:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Join a pandas dataframe to feature class table by matching column</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1200212#M7915</link>
      <description>&lt;P&gt;csv as input to&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/table-to-table.htm" target="_blank"&gt;Table To Table (Conversion)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;then addjoin is one approach, unless you want to keep with the arcgis api&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 16:59:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1200212#M7915</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-08-07T16:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Join a pandas dataframe to feature class table by matching column</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1200753#M7916</link>
      <description>&lt;P&gt;Just wondering if I am understanding correctly. You suggest converting the dataframe to a csv, then converting the csv to a gdb using the "Table To Table", at which point it should be able to join to my feature classes table using "AddJoin" as above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be clear, I jsut want to add the corresponding data from the df to the feature class whic will be my end product here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks or the help.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 12:17:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1200753#M7916</guid>
      <dc:creator>MaxDuso</dc:creator>
      <dc:date>2022-08-09T12:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Join a pandas dataframe to feature class table by matching column</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1222624#M7917</link>
      <description>&lt;P&gt;Here is code sketch&lt;/P&gt;&lt;P&gt;arcpy.management.AddField('MyFeatureClass','NewFC_Field')&lt;/P&gt;&lt;P&gt;fields =['&lt;SPAN&gt;ecoregion_name',&amp;nbsp;&lt;/SPAN&gt;'NewFC_Field']&lt;/P&gt;&lt;P&gt;with arcpy.da.UpdateCursor('MyFeatureClass','fields) as cursor:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;for row in cursor:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row[1] = Dataframe[Dataframe['ecoregion_name' == row[0]]['DataframeFieldToTransfer']&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cursor.updateRow(row)&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 20:15:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1222624#M7917</guid>
      <dc:creator>DavidAnderson_1701</dc:creator>
      <dc:date>2022-10-17T20:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Join a pandas dataframe to feature class table by matching column</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1327919#M8996</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/564196"&gt;@MaxDuso&lt;/a&gt;&amp;nbsp;where you able to find a solution on your own?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 19:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/join-a-pandas-dataframe-to-feature-class-table-by/m-p/1327919#M8996</guid>
      <dc:creator>ArianaMo1912</dc:creator>
      <dc:date>2023-09-12T19:31:52Z</dc:date>
    </item>
  </channel>
</rss>

