{"id":9760,"date":"2016-01-05T12:11:42","date_gmt":"2016-01-05T10:11:42","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=9760"},"modified":"2015-12-28T12:51:58","modified_gmt":"2015-12-28T10:51:58","slug":"python-squashing-duplicate-pairs-together","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/","title":{"rendered":"Python: Squashing &#8216;duplicate&#8217; pairs together"},"content":{"rendered":"<p>As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together.<\/p>\n<p>I couldn\u2019t work out how to solve the problem immediately so I simplified the problem into pairs of letters i.e.<\/p>\n<pre class=\" brush:text\">A\tB\t\t(A is the same as B)\r\nB\tC\t\t(B is the same as C)\r\nC\tD\t\t...\r\nE\tF\t\t(E is the same as F)\r\nF\tG\t\t...<\/pre>\n<p>The output that I want to get is:<\/p>\n<pre class=\" brush:text\">(A, B, C, F)\r\n(E, F, G)<\/pre>\n<p>I spent several hours trying to come up with a clever data structure to do this until <a href=\"https:\/\/reshmeeauckloo.wordpress.com\/\">Reshmee<\/a> suggested tracking the sets of duplicates using an array of arrays or list of lists since we\u2019re going to script this using Python.<\/p>\n<p>The actual data is in a CSV file but we\u2019ll create a list of tuples to save ourselves some work:<\/p>\n<pre class=\" brush:py\">pairs = [ (\"A\", \"B\"), (\"B\", \"C\"), (\"C\", \"D\"), (\"E\", \"F\"), (\"F\", \"G\") ]<\/pre>\n<p>We\u2019re going to iterate through the list of pairs and on each iteration we\u2019ll check if there\u2019s an entry in the list containing either of the values. There can be three outcomes from this check:<\/p>\n<ol>\n<li>No entry \u2013 we\u2019ll add a new entry with our pair of values.<\/li>\n<li>One entry \u2013 we\u2019ll add the other value to that entry.<\/li>\n<li>Two entries \u2013 we\u2019ll merge them together replacing the existing entry.<\/li>\n<\/ol>\n<p>The first step is to write a function to check the list of lists for a matching pair:<\/p>\n<pre class=\" brush:py\">def find_matching_index(pair, dups):\r\n    return [index\r\n            for index, dup in enumerate(dups)\r\n            if pair[0] in dup or pair[1] in dup]\r\n\u00a0\r\nprint find_matching_index((\"A\", \"B\"), [set([\"D\", \"E\"])])\r\n[]\r\n\u00a0\r\nprint find_matching_index((\"B\", \"C\"), [set([\"A\", \"B\"])])\r\n[0]\r\n\u00a0\r\nprint find_matching_index((\"B\", \"C\"), [set([\"A\", \"B\"]), set([\"C\", \"D\"])])\r\n[0, 1]<\/pre>\n<p>Next we need to write a function which iterates over all our pairs of values and uses <cite>find_matching_index<\/cite> to work out which decision to make:<\/p>\n<pre class=\" brush:py\">def extract_groups(items):\r\n    dups = []\r\n    for pair in items:\r\n        matching_index = find_matching_index(pair, dups)\r\n\u00a0\r\n        if len(matching_index) == 0:\r\n            dups.append(set([pair[0], pair[1]]))\r\n        elif len(matching_index) == 1:\r\n            index = matching_index[0]\r\n            matching_dup = dups[index]\r\n            dups.pop(index)\r\n            dups.append(matching_dup.union([pair[0], pair[1]]))\r\n        else:\r\n            index1, index2 = matching_index\r\n            dup1 = dups[index1]\r\n            dup2 = dups[index2]\r\n\u00a0\r\n            dups.pop(index1)\r\n            dups.pop(index2 - 1) # the index decrements since we removed one entry on the previous line\r\n            dups.append(dup1.union(dup2))\r\n    return dups<\/pre>\n<p>Now let\u2019s run this with a few test cases:<\/p>\n<pre class=\" brush:py\">test_cases = [\r\n    [ (\"A\", \"B\"), (\"B\", \"C\"), (\"C\", \"D\"), (\"E\", \"F\"), (\"F\", \"G\") ],\r\n    [ (\"A\", \"B\"), (\"B\", \"C\"), (\"C\", \"D\"), (\"E\", \"F\"), (\"F\", \"G\"), (\"G\", \"A\"), (\"G\", \"Z\"), (\"B\", \"D\") ],\r\n    [ (\"A\", \"B\"), (\"B\", \"C\"), (\"C\", \"E\"), (\"E\", \"A\") ],\r\n    [ (\"A\", \"B\"), (\"C\", \"D\"), (\"F\", \"G\"), (\"H\", \"I\"), (\"J\", \"A\") ]\r\n]\r\n\u00a0\r\nfor test_case in test_cases:\r\n    print extract_groups(test_case)\r\n\u00a0\r\n[set(['A', 'C', 'B', 'D']), set(['E', 'G', 'F'])]\r\n[set(['A', 'C', 'B', 'E', 'D', 'G', 'F', 'Z'])]\r\n[set(['A', 'C', 'B', 'E'])]\r\n[set(['C', 'D']), set(['G', 'F']), set(['I', 'H']), set(['A', 'J', 'B'])]<\/pre>\n<p>This certainly doesn\u2019t scale very well but since I only have a few hundred duplicate addresses it does the job for me.<\/p>\n<p>It feels like there should be a more functional way to write these functions without mutating all these lists but I haven\u2019t figured out what that is yet.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/www.markhneedham.com\/blog\/2015\/12\/20\/python-squashing-duplicate-pairs-together\/\">Python: Squashing &#8216;duplicate&#8217; pairs together<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/join-us\/wcg\/\">WCG partner<\/a> Mark Needham at the <a href=\"http:\/\/www.markhneedham.com\/blog\/\">Mark Needham Blog<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the problem immediately so I simplified the problem into pairs of letters i.e. A B (A is the same as B) B C (B is the same &hellip;<\/p>\n","protected":false},"author":48,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-9760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python: Squashing &#039;duplicate&#039; pairs together - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the\" \/>\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.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python: Squashing &#039;duplicate&#039; pairs together - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-05T10:11:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mark Needham\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Needham\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\"},\"author\":{\"name\":\"Mark Needham\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e\"},\"headline\":\"Python: Squashing &#8216;duplicate&#8217; pairs together\",\"datePublished\":\"2016-01-05T10:11:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\"},\"wordCount\":317,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\",\"name\":\"Python: Squashing 'duplicate' pairs together - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2016-01-05T10:11:42+00:00\",\"description\":\"As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python: Squashing &#8216;duplicate&#8217; pairs together\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e\",\"name\":\"Mark Needham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g\",\"caption\":\"Mark Needham\"},\"sameAs\":[\"http:\/\/www.markhneedham.com\/blog\/\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/mark-needham\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python: Squashing 'duplicate' pairs together - Web Code Geeks - 2026","description":"As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the","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.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/","og_locale":"en_US","og_type":"article","og_title":"Python: Squashing 'duplicate' pairs together - Web Code Geeks - 2026","og_description":"As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the","og_url":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2016-01-05T10:11:42+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Mark Needham","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Mark Needham","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/"},"author":{"name":"Mark Needham","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e"},"headline":"Python: Squashing &#8216;duplicate&#8217; pairs together","datePublished":"2016-01-05T10:11:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/"},"wordCount":317,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/","url":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/","name":"Python: Squashing 'duplicate' pairs together - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2016-01-05T10:11:42+00:00","description":"As part of a data cleaning pipeline I had pairs of ids of duplicate addresses that I wanted to group together. I couldn\u2019t work out how to solve the","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/python-squashing-duplicate-pairs-together\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python: Squashing &#8216;duplicate&#8217; pairs together"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/848a54e2ee724e46069ce36c2e52e98e","name":"Mark Needham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5489baed26ce2d932bf951ecfb47afe80bec45d3648c23521d87c83b8f1c3ea9?s=96&d=mm&r=g","caption":"Mark Needham"},"sameAs":["http:\/\/www.markhneedham.com\/blog\/"],"url":"https:\/\/www.webcodegeeks.com\/author\/mark-needham\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/9760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=9760"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/9760\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=9760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=9760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=9760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}