<?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 Arcpy to join tables? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058458#M61149</link>
    <description>&lt;P&gt;did that work for you Dan?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 12:28:09 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2021-05-17T12:28:09Z</dc:date>
    <item>
      <title>Using Arcpy to join tables?</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058310#M61138</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm using ArcMap and Python 2.7 to do a project&lt;/P&gt;&lt;P&gt;I have been given a shape file and some .CSV's, i need to workout the average value for a field in a given&amp;nbsp; polygon using python&lt;/P&gt;&lt;P&gt;CSV's:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;LAD_to_LAU1_to_NUTS3_to_NUTS2_to_NUTS1_January_2018_Lookup_in_the_UK.csv&lt;/LI&gt;&lt;LI&gt;SportsStatisticsforPython&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;the two CSV's&amp;nbsp; join well using the ArcMap UI, however when running the join tool both from the Data Management toolbox and the in ArcMap Python Console i get the following error after trying to link "counties" of the SportsStatisticsforPython.csv to the "LAU118CD" field of LAD_to_LAU1...etc (see screenshots at the end of post)&lt;/P&gt;&lt;P&gt;ExecuteError: ERROR 000339: Input LAD_to_LAU1_to_NUTS3_to_NUTS2_to_NUTS1_January_2018_Lookup_in_the_UK.csv does not have OIDs Failed to execute (AddJoin).&lt;/P&gt;&lt;P&gt;can someone explain why its not working and how could go about fixing it, preferably in Python 2.7 as i will need to write a script that joins them together then finds the mean participation value for each county, which will then need to be linked to the relevant county in my shape file.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;U&gt;screenshots of the CSV and shapefile attribute tables&amp;nbsp;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;SportsStatisticsforPython.CSV&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielFuller_1-1621115864402.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/13397i78A17FF5CC6C690A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielFuller_1-1621115864402.png" alt="DanielFuller_1-1621115864402.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;LAD_to_LAU1..etc...etc..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielFuller_4-1621116859281.png" style="width: 751px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/13400iCC998553B7DFC622/image-dimensions/751x147?v=v2" width="751" height="147" role="button" title="DanielFuller_4-1621116859281.png" alt="DanielFuller_4-1621116859281.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shape File Attribute Table&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielFuller_3-1621116804587.png" style="width: 647px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/13399iD3B3ABB18179AAAE/image-dimensions/647x178?v=v2" width="647" height="178" role="button" title="DanielFuller_3-1621116804587.png" alt="DanielFuller_3-1621116804587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 May 2021 22:15:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058310#M61138</guid>
      <dc:creator>DanielFuller</dc:creator>
      <dc:date>2021-05-15T22:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcpy to join tables?</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058311#M61139</link>
      <description>&lt;P&gt;Possibly the join table needs to be Table View, try creating a table view from your CSV and then use that view to join against.&lt;/P&gt;&lt;P&gt;I'd recommend using Add Join Data Management to permeate the join.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-table-view.htm" target="_blank"&gt;Make Table View (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

arcpy.MakeTableView_management("C:/data/myCSV.csv", "myCSV_view")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 15 May 2021 22:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058311#M61139</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-05-15T22:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcpy to join tables?</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058328#M61140</link>
      <description>&lt;P&gt;Unfortunately that didn't work, reading the error the tables need object ID's but that doesn't make sense in the context of my project?&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 09:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058328#M61140</guid>
      <dc:creator>DanielFuller</dc:creator>
      <dc:date>2021-05-16T09:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcpy to join tables?</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058335#M61141</link>
      <description>&lt;P&gt;Ah, it looks like a csv isn't considered a table.&amp;nbsp; A solution is to use CopyRows_management to create a table from the csv.&amp;nbsp; I would just create this in memory.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# create in memory path
memory = 'in_memory'
mem_table_path = os.path.join(memory, 'csv')

#create the in memory table
arcpy.CopyRows_management(PathToYourCSV, mem_table_path)   

#do the join
arcpy.JoinField_management(in_fc_path, in_field, mem_table_path, join_field, [fields])&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 16 May 2021 13:08:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058335#M61141</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-05-16T13:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcpy to join tables?</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058458#M61149</link>
      <description>&lt;P&gt;did that work for you Dan?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 12:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1058458#M61149</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-05-17T12:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Arcpy to join tables?</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1059849#M61177</link>
      <description>&lt;P&gt;yes thankyou!&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 11:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-join-tables/m-p/1059849#M61177</guid>
      <dc:creator>DanielFuller</dc:creator>
      <dc:date>2021-05-20T11:12:46Z</dc:date>
    </item>
  </channel>
</rss>

