{"id":451792,"date":"2019-08-14T11:10:09","date_gmt":"2019-08-14T18:10:09","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=451792"},"modified":"2019-08-22T11:19:09","modified_gmt":"2019-08-22T18:19:09","slug":"pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features","title":{"rendered":"Pivot rows of long tabular data to columns for joining to features"},"author":7121,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23341,23851,22941],"tags":[344812,445032,445022,445042,344822],"industry":[],"product":[36561],"class_list":["post-451792","blog","type-blog","status-publish","format-standard","hentry","category-analytics","category-data-management","category-mapping","tag-data-schema","tag-pivot-table","tag-reshape-data","tag-rows-to-columns","tag-tabular-data","product-arcgis-pro"],"acf":{"short_description":"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table. ","flexible_content":[{"acf_fc_layout":"content","content":"<p>We\u2019ve all been there, we open up a data table for the first time, only to see that it is \u201cstacked\u201d or \u201clong\u201d \u2013 meaning that it has more than one record per geography. For example, a dataset may have a record for each state and for each year. Why are so many tabular datasets long? Good relational databases are set up this way so that adding new years&#8217; worth of data doesn&#8217;t require a schema change of adding a new field. Also, additional rows are often smaller in file size than additional columns in most database programs.<\/p>\n<p>GIS vector data works well when one record in the table corresponds to one point, line, or polygon on the map. We don\u2019t want duplicate features on our map, or duplicate features slowing down our processing time. If a dataset has multiple dimensions (multiple years or categories, in addition to multiple locations), we tend to prefer a \u201cwide\u201d dataset in which those multiple years or categories are different attribute fields.<\/p>\n<h1>Transform long data to wide data with the Pivot Table tool<\/h1>\n<p>Fortunately, there is a tool called Pivot Table in ArcGIS Pro\u2019s Data Management toolbox that is designed to transform long data to wide data. As the tool\u2019s name implies, it pivots rows into columns to reshape a table so that it is more suitable for joining to features based on a common attribute.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":581782,"id":581782,"title":"PivotTable","filename":"PivotTable.png","filesize":90374,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/pivottable","alt":"Picture of two small tables, one has multiple rows for the same geography but different years. An arrow from that table to the second, which has years as columns instead of rows.","author":"7121","description":"","caption":"","name":"pivottable","status":"inherit","uploaded_to":451792,"date":"2019-08-07 20:35:46","modified":"2019-08-08 21:18:57","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":826,"height":465,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","medium_large-width":768,"medium_large-height":432,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","large-width":826,"large-height":465,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","1536x1536-width":826,"1536x1536-height":465,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","2048x2048-width":826,"2048x2048-height":465,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","card_image-width":826,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","wide_image-width":826,"wide_image-height":465}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>To start, add your table to a geodatabase (.gdb). You can use the <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/conversion\/excel-to-table.htm\">Excel to Table<\/a> or <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/conversion\/table-to-table.htm\">Table to Table<\/a> conversion tools to bring in your table to a GDB within your project.<\/p>\n<h1>Example 1: data with multiple years<\/h1>\n<p>Here I have a table of values of opioid pills purchased by pharmacies from suppliers summarized by state. When sorted by state, it appears that there are seven years of data in this table.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":581932,"id":581932,"title":"stacked_state_pills_by_year","filename":"stacked_state_pills_by_year.png","filesize":47301,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/stacked_state_pills_by_year","alt":"Table with three fields: state, year, and pills. Each state has 7 rows, one for each year (2006 - 2012).","author":"7121","description":"","caption":"","name":"stacked_state_pills_by_year","status":"inherit","uploaded_to":451792,"date":"2019-08-07 23:34:38","modified":"2019-08-08 21:20:04","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":623,"height":574,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","medium-width":283,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","medium_large-width":623,"medium_large-height":574,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","large-width":623,"large-height":574,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","1536x1536-width":623,"1536x1536-height":574,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","2048x2048-width":623,"2048x2048-height":574,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year-505x465.png","card_image-width":505,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_year.png","wide_image-width":623,"wide_image-height":574}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>I want to pivot the rows in this table to columns so that each year becomes an attribute field. The dialog box for this tool asks for <strong>five parameters: <\/strong><\/p>\n<ol>\n<li>Input table<\/li>\n<li>Input field<\/li>\n<li>Pivot field<\/li>\n<li>Value field<\/li>\n<li>Output table<\/li>\n<\/ol>\n<p>I\u2019ll put in the table I\u2019m currently working with as my <strong>input table<\/strong>, and the field that I want to remain as rows as my <strong>input field<\/strong>. The field I want to pivot is the year field, which will become new attribute fields, so I&#8217;ll put year in for the <strong>pivot field<\/strong>. The field I&#8217;m most interested in is the <strong>value field<\/strong>, in this case, the pills field:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":581952,"id":581952,"title":"pivot_table_1","filename":"pivot_table_1.png","filesize":30668,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/pivot_table_1","alt":"Geoprocessing tool dialog box.","author":"7121","description":"","caption":"","name":"pivot_table_1","status":"inherit","uploaded_to":451792,"date":"2019-08-07 23:35:38","modified":"2019-08-08 21:20:35","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":625,"height":412,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","medium-width":396,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","medium_large-width":625,"medium_large-height":412,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","large-width":625,"large-height":412,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","1536x1536-width":625,"1536x1536-height":412,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","2048x2048-width":625,"2048x2048-height":412,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","card_image-width":625,"card_image-height":412,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_1.png","wide_image-width":625,"wide_image-height":412}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>After running this tool, I get a new table that has one row per state, one field for each year, and the value in the pills field is appropriately filled in to the cells. I no longer have a field called \u201cpills.\u201d<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":581962,"id":581962,"title":"pivoted_state_pills_by_year","filename":"pivoted_state_pills_by_year.png","filesize":81652,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/pivoted_state_pills_by_year","alt":"A table with one row per state, and multiple fields - one fore each year.","author":"7121","description":"","caption":"","name":"pivoted_state_pills_by_year","status":"inherit","uploaded_to":451792,"date":"2019-08-07 23:36:31","modified":"2019-08-08 21:20:59","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":678,"height":503,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","medium-width":352,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","medium_large-width":678,"medium_large-height":503,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","large-width":678,"large-height":503,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","1536x1536-width":678,"1536x1536-height":503,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","2048x2048-width":678,"2048x2048-height":503,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year-627x465.png","card_image-width":627,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_year.png","wide_image-width":678,"wide_image-height":503}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>You may notice that the new table has slightly longer field names. The years (or other numbers) are now part of the field name here since year is no longer its own column. Many software programs including ArcGIS do not let you start field names with numbers, which is why the numbers need to be a suffix, e.g. \u201cyear2019\u201d instead of \u201c2019.\u201d\u00a0 That&#8217;s okay because ArcGIS does let you enter aliases for these field names, which can begin with numbers.<\/p>\n<h1>Example 2: data with multiple categories<\/h1>\n<p>Some stacked datasets are long because they contain values for multiple categories for each geography. The Pivot Table tool works just as well for string values as it does for numeric values such as years. For example, here I have a table of the opioid pills purchased by pharmacies summarized by state, but instead of values by year, I have values by drug type (hydrocodone vs. oxycodone).<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":581972,"id":581972,"title":"stacked_state_pills_by_type","filename":"stacked_state_pills_by_type.png","filesize":52385,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/stacked_state_pills_by_type","alt":"A table with three fields: state, drug type, and pills. Each state has two rows (one fore each drug type).","author":"7121","description":"","caption":"","name":"stacked_state_pills_by_type","status":"inherit","uploaded_to":451792,"date":"2019-08-07 23:37:26","modified":"2019-08-08 21:21:30","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":653,"height":499,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","medium-width":342,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","medium_large-width":653,"medium_large-height":499,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","large-width":653,"large-height":499,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","1536x1536-width":653,"1536x1536-height":499,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","2048x2048-width":653,"2048x2048-height":499,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type-609x465.png","card_image-width":609,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/stacked_state_pills_by_type.png","wide_image-width":653,"wide_image-height":499}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>Here my pivot field is drug_name instead of year:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":581992,"id":581992,"title":"pivot_table_2","filename":"pivot_table_2.png","filesize":27595,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/pivot_table_2","alt":"Geoprocessing tool dialog box.","author":"7121","description":"","caption":"","name":"pivot_table_2","status":"inherit","uploaded_to":451792,"date":"2019-08-08 00:37:23","modified":"2019-08-08 21:21:49","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":626,"height":415,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","medium-width":394,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","medium_large-width":626,"medium_large-height":415,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","large-width":626,"large-height":415,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","1536x1536-width":626,"1536x1536-height":415,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","2048x2048-width":626,"2048x2048-height":415,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","card_image-width":626,"card_image-height":415,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivot_table_2.png","wide_image-width":626,"wide_image-height":415}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>The unique strings within the pivot field then become my new attribute fields, very similar to the new year fields before:<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":582002,"id":582002,"title":"pivoted_state_pills_by_type","filename":"pivoted_state_pills_by_type.png","filesize":45422,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\/pivoted_state_pills_by_type","alt":"A table with three rows: state, hydrocodone, and oxycodone. One row for each state.","author":"7121","description":"","caption":"","name":"pivoted_state_pills_by_type","status":"inherit","uploaded_to":451792,"date":"2019-08-08 00:38:25","modified":"2019-08-08 21:22:24","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":651,"height":503,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","medium-width":338,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","medium_large-width":651,"medium_large-height":503,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","large-width":651,"large-height":503,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","1536x1536-width":651,"1536x1536-height":503,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","2048x2048-width":651,"2048x2048-height":503,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type-602x465.png","card_image-width":602,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/08\/pivoted_state_pills_by_type.png","wide_image-width":651,"wide_image-height":503}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h1>Next steps: join, analyze, map!<\/h1>\n<p>Now that your table has one record for each point, line, or polygon you\u2019d like to join to, run the <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/data-management\/join-field.htm\">Join Field<\/a> tool to jump start your analysis and mapping!<\/p>\n<p>Besides making your data easier to join to features, another advantage to working with data that is wide (many columns rather than many rows) is that it\u2019s easier to calculate change over time or the difference between two categories with a simple field calculation. These new calculated fields can be mapped as well, allowing you to further explore and represent your data!<\/p>\n<p>Pivot Table is available with the Advanced license of ArcGIS Pro. For more info on the Pivot Table tool, see the tool\u2019s <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/data-management\/pivot-table.htm\">official help page<\/a>.<\/p>\n<p>&nbsp;<\/p>\n"}],"authors":[{"ID":7121,"user_firstname":"Diana","user_lastname":"Lavery","nickname":"Diana Lavery","user_nicename":"dianaclavery_global","display_name":"Diana Lavery","user_email":"DLavery@esri.com","user_url":"","user_registered":"2018-03-02 00:19:20","user_description":"(she\/her\/hers) Diana loves working with data. She has over 15 years experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior GIS engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"related_articles":"","card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/07\/PivotTable.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/03\/generic_banner.png"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Pivot rows of long tabular data to columns for joining to features<\/title>\n<meta name=\"description\" content=\"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pivot rows of long tabular data to columns for joining to features\" \/>\n<meta property=\"og:description\" content=\"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-22T18:19:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\"},\"author\":{\"name\":\"Diana Lavery\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9\"},\"headline\":\"Pivot rows of long tabular data to columns for joining to features\",\"datePublished\":\"2019-08-14T18:10:09+00:00\",\"dateModified\":\"2019-08-22T18:19:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\"},\"wordCount\":12,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"data schema\",\"pivot table\",\"reshape data\",\"rows to columns\",\"tabular data\"],\"articleSection\":[\"Analytics\",\"Data Management\",\"Mapping\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\",\"name\":\"Pivot rows of long tabular data to columns for joining to features\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2019-08-14T18:10:09+00:00\",\"dateModified\":\"2019-08-22T18:19:09+00:00\",\"description\":\"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Pivot rows of long tabular data to columns for joining to features\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9\",\"name\":\"Diana Lavery\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg\",\"caption\":\"Diana Lavery\"},\"description\":\"(she\/her\/hers) Diana loves working with data. She has over 15 years experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior GIS engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/dianaclavery_global\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pivot rows of long tabular data to columns for joining to features","description":"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features","og_locale":"en_US","og_type":"article","og_title":"Pivot rows of long tabular data to columns for joining to features","og_description":"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2019-08-22T18:19:09+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features"},"author":{"name":"Diana Lavery","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9"},"headline":"Pivot rows of long tabular data to columns for joining to features","datePublished":"2019-08-14T18:10:09+00:00","dateModified":"2019-08-22T18:19:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features"},"wordCount":12,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["data schema","pivot table","reshape data","rows to columns","tabular data"],"articleSection":["Analytics","Data Management","Mapping"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features","name":"Pivot rows of long tabular data to columns for joining to features","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2019-08-14T18:10:09+00:00","dateModified":"2019-08-22T18:19:09+00:00","description":"Reshape long data to wide data by using my newest favorite geoprocessing tool: Pivot Table.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-pro\/data-management\/pivot-rows-of-long-tabular-data-to-columns-for-joining-to-features#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Pivot rows of long tabular data to columns for joining to features"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/1f2b2b13a804cac814ed4245368e9eb9","name":"Diana Lavery","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/04\/diana-lavery-3z7a9428-213x200.jpg","caption":"Diana Lavery"},"description":"(she\/her\/hers) Diana loves working with data. She has over 15 years experience as a practitioner of demography, sociology, economics, policy analysis, and GIS. Diana holds a BA in quantitative economics and an MA in applied demography. She is a senior GIS engineer on ArcGIS Living Atlas of the World's Policy Maps team. Diana enjoys strong coffee and clean datasets, usually simultaneously.","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/dianaclavery_global"}]}},"text_date":"August 14, 2019","author_name":"Diana Lavery","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/dianaclavery_global","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2019\/03\/generic_banner.png","primary_product":"ArcGIS Pro","tag_data":[{"term_id":344812,"name":"data schema","slug":"data-schema","term_group":0,"term_taxonomy_id":344812,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":445032,"name":"pivot table","slug":"pivot-table","term_group":0,"term_taxonomy_id":445032,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":445022,"name":"reshape data","slug":"reshape-data","term_group":0,"term_taxonomy_id":445022,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":445042,"name":"rows to columns","slug":"rows-to-columns","term_group":0,"term_taxonomy_id":445042,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":344822,"name":"tabular data","slug":"tabular-data","term_group":0,"term_taxonomy_id":344822,"taxonomy":"post_tag","description":"","parent":0,"count":3,"filter":"raw"}],"category_data":[{"term_id":23341,"name":"Analytics","slug":"analytics","term_group":0,"term_taxonomy_id":23341,"taxonomy":"category","description":"","parent":0,"count":1325,"filter":"raw"},{"term_id":23851,"name":"Data Management","slug":"data-management","term_group":0,"term_taxonomy_id":23851,"taxonomy":"category","description":"","parent":0,"count":920,"filter":"raw"},{"term_id":22941,"name":"Mapping","slug":"mapping","term_group":0,"term_taxonomy_id":22941,"taxonomy":"category","description":"","parent":0,"count":2683,"filter":"raw"}],"product_data":[{"term_id":36561,"name":"ArcGIS Pro","slug":"arcgis-pro","term_group":0,"term_taxonomy_id":36561,"taxonomy":"product","description":"","parent":0,"count":2035,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-pro","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/451792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/7121"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=451792"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/451792\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=451792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=451792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=451792"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=451792"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=451792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}