Tuesday 25 April 2017

esri geodatabase - Moving data from columns in a table to rows by a key field?



I would like to shift data found in a column to a row by Key field. I have a table, within a geodatabase, set up similar to what's below.


KEY_    Value
123 Yellow
123 Blue
456 Red
456 Yellow
789 Green
246 Green
246 Orange


I want to create a table that moves the data in the Value field to rows based on the KEY_ field. The result will look like what's below.


KEY_    Value001    Value002
123 Yellow Blue
456 Red Yellow
789 Green
246 Green Orange

Does anyone have an idea of how this can be done? I tried using the Transpose tool Esri offers but it didn't produce the result I'm looking for. I have basic understanding of Python.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...