Using arcpy tools to extract means from one table and join them to another

945
1
Jump to solution
05-23-2021 04:48 AM
DanielFuller
New Contributor III
Hello
 
I have a shape file and two tables, a data and a link table. the shape file is at one, coarser level of governance, the data table is at a finer level of governance and the link table contains both levels of governance, allowing me to link them through a table join. (this will make sense with screenshots i promise)

I need to workout the mean participation value from the data table for the coarser level of governance, what this means is i have multiple values from the finer level that i need to calculate the mean for then link to the coarser level. I've tried using the summary statistics tool on a joined then exported table with casefields but the return seems to be an integer, not a float

Screenshots

 

DanielFuller_3-1621770320916.png

Feature layer table, working field is NUTS315CD/NUTS315NM

 

DanielFuller_4-1621770334323.png

Link table, Contains NUTS318CD(same codes as the previous table just different naming convention) and finer level of governance codes needed to link to the data table

 

DanielFuller_5-1621770346654.png

data table, county is the same as LAD16C from the link table, participation is the data i need to calculate the mean for

DanielFuller_6-1621770386149.png

merged table that i'm trying to run tools on 

Do you have any pointers for tools or scripts?

0 Kudos
1 Solution

Accepted Solutions
DavidPike
MVP Frequent Contributor

I'd recommend looking into the issue with the Summary Statistics tool, it is by far the easiest solution.  Maybe post that issue.

View solution in original post

1 Reply
DavidPike
MVP Frequent Contributor

I'd recommend looking into the issue with the Summary Statistics tool, it is by far the easiest solution.  Maybe post that issue.