{"id":137,"date":"2017-12-29T10:34:50","date_gmt":"2017-12-29T10:34:50","guid":{"rendered":"http:\/\/fcpython.com\/?p=137"},"modified":"2020-12-18T20:10:10","modified_gmt":"2020-12-18T20:10:10","slug":"joining-data","status":"publish","type":"post","link":"https:\/\/fcpython.com\/data-analysis\/joining-data","title":{"rendered":"Joining Data"},"content":{"rendered":"<div class=\"cell border-box-sizing text_cell rendered\">\n<div class=\"prompt input_prompt\">\n<\/div>\n<div class=\"inner_cell\">\n<div class=\"text_cell_render border-box-sizing rendered_html\">\n<p>Incomplete data sets, whether they are missing individual values or full rows and columns, are a common problem in data analysis. Luckily for us, Pandas has lots of tools to help us make these data sets easier to handle.<\/p>\n<p>In this article, we will run through 2 of Pandas&#8217; main methods for bundling dataFrames together &#8211; concatenating and merging.<\/p>\n<p>Let&#8217;s set ourselves up with three one-row dataFrames, with stats from our recent matches.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing code_cell rendered\">\n<div class=\"input\">\n<div class=\"prompt input_prompt\">In&nbsp;[1]:<\/div>\n<div class=\"inner_cell\">\n<div class=\"input_area\">\n<div class=\" highlight hl-ipython3\">\n<pre><span><\/span><span class=\"kn\">import<\/span> <span class=\"nn\">numpy<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">np<\/span>\r\n<span class=\"kn\">import<\/span> <span class=\"nn\">pandas<\/span> <span class=\"k\">as<\/span> <span class=\"nn\">pd<\/span>\r\n\r\n<span class=\"n\">match1<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">({<\/span><span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Selche FC&#39;<\/span><span class=\"p\">],<\/span>\r\n                      <span class=\"s1\">&#39;GoalsFor&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\r\n                       <span class=\"s1\">&#39;GoalsAgainst&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\r\n                       <span class=\"s1\">&#39;Attendance&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">53225<\/span><span class=\"p\">]})<\/span>\r\n\r\n<span class=\"n\">match2<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">({<\/span><span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Sudaton FC&#39;<\/span><span class=\"p\">],<\/span>\r\n                      <span class=\"s1\">&#39;GoalsFor&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">3<\/span><span class=\"p\">],<\/span>\r\n                       <span class=\"s1\">&#39;GoalsAgainst&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">0<\/span><span class=\"p\">],<\/span>\r\n                       <span class=\"s1\">&#39;Attendance&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">53256<\/span><span class=\"p\">]})<\/span>\r\n\r\n<span class=\"n\">match3<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">({<\/span><span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Ouestjambon United&#39;<\/span><span class=\"p\">],<\/span>\r\n                      <span class=\"s1\">&#39;GoalsFor&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">4<\/span><span class=\"p\">],<\/span>\r\n                       <span class=\"s1\">&#39;GoalsAgainst&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">1<\/span><span class=\"p\">],<\/span>\r\n                       <span class=\"s1\">&#39;Attendance&#39;<\/span><span class=\"p\">:[<\/span><span class=\"mi\">53225<\/span><span class=\"p\">]})<\/span>\r\n\r\n<span class=\"n\">match3<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"output_wrapper\">\n<div class=\"output\">\n<div class=\"output_area\">\n<div class=\"prompt output_prompt\">Out[1]:<\/div>\n<div class=\"output_html rendered_html output_subarea output_execute_result\">\n<div>\n<style>\n    .dataframe thead tr:only-child th {\n        text-align: right;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: left;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n<\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th><\/th>\n<th>Attendance<\/th>\n<th>GoalsAgainst<\/th>\n<th>GoalsFor<\/th>\n<th>Opponent<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>53225<\/td>\n<td>1<\/td>\n<td>4<\/td>\n<td>Ouestjambon United<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing text_cell rendered\">\n<div class=\"prompt input_prompt\">\n<\/div>\n<div class=\"inner_cell\">\n<div class=\"text_cell_render border-box-sizing rendered_html\">\n<h3 id=\"Concatenation\">Concatenation<\/h3>\n<p>Our simplest method of joining data is to simply stick one on the ned of the other &#8211; as the concatenate method allows us to do. &#8216;pd.concat()&#8217; with a list of our data frames will do the trick:<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing code_cell rendered\">\n<div class=\"input\">\n<div class=\"prompt input_prompt\">In&nbsp;[2]:<\/div>\n<div class=\"inner_cell\">\n<div class=\"input_area\">\n<div class=\" highlight hl-ipython3\">\n<pre><span><\/span><span class=\"n\">AllMatches<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">([<\/span><span class=\"n\">match1<\/span><span class=\"p\">,<\/span><span class=\"n\">match2<\/span><span class=\"p\">,<\/span><span class=\"n\">match3<\/span><span class=\"p\">])<\/span>\r\n<span class=\"n\">AllMatches<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"output_wrapper\">\n<div class=\"output\">\n<div class=\"output_area\">\n<div class=\"prompt output_prompt\">Out[2]:<\/div>\n<div class=\"output_html rendered_html output_subarea output_execute_result\">\n<div>\n<style>\n    .dataframe thead tr:only-child th {\n        text-align: right;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: left;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n<\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th><\/th>\n<th>Attendance<\/th>\n<th>GoalsAgainst<\/th>\n<th>GoalsFor<\/th>\n<th>Opponent<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>53225<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>Selche FC<\/td>\n<\/tr>\n<tr>\n<th>0<\/th>\n<td>53256<\/td>\n<td>0<\/td>\n<td>3<\/td>\n<td>Sudaton FC<\/td>\n<\/tr>\n<tr>\n<th>0<\/th>\n<td>53225<\/td>\n<td>1<\/td>\n<td>4<\/td>\n<td>Ouestjambon United<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing text_cell rendered\">\n<div class=\"prompt input_prompt\">\n<\/div>\n<div class=\"inner_cell\">\n<div class=\"text_cell_render border-box-sizing rendered_html\">\n<h3 id=\"Merging\">Merging<\/h3>\n<p>&#8216;pd.merge()&#8217; will allow us to stick data together left-to-right. Let&#8217;s first create more details for our matches above that we can then merge then:<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing code_cell rendered\">\n<div class=\"input\">\n<div class=\"prompt input_prompt\">In&nbsp;[3]:<\/div>\n<div class=\"inner_cell\">\n<div class=\"input_area\">\n<div class=\" highlight hl-ipython3\">\n<pre><span><\/span><span class=\"n\">match1scorers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">({<\/span><span class=\"s1\">&#39;First&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Sally&#39;<\/span><span class=\"p\">],<\/span>\r\n                              <span class=\"s1\">&#39;Last&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Billy&#39;<\/span><span class=\"p\">],<\/span>\r\n                            <span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Selche FC&#39;<\/span><span class=\"p\">]})<\/span>\r\n                      \r\n<span class=\"n\">match2scorers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">({<\/span><span class=\"s1\">&#39;First&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Sally&#39;<\/span><span class=\"p\">],<\/span>\r\n                              <span class=\"s1\">&#39;Last&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Pip&#39;<\/span><span class=\"p\">],<\/span>\r\n                             <span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Sudaton FC&#39;<\/span><span class=\"p\">]})<\/span>\r\n\r\n<span class=\"n\">match3scorers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">DataFrame<\/span><span class=\"p\">({<\/span><span class=\"s1\">&#39;First&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Sally&#39;<\/span><span class=\"p\">],<\/span>\r\n                             <span class=\"s1\">&#39;Last&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Sally&#39;<\/span><span class=\"p\">],<\/span>\r\n                             <span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">:[<\/span><span class=\"s1\">&#39;Ouestjambon United&#39;<\/span><span class=\"p\">]})<\/span>\r\n\r\n<span class=\"n\">AllScorers<\/span> <span class=\"o\">=<\/span> <span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">concat<\/span><span class=\"p\">([<\/span><span class=\"n\">match1scorers<\/span><span class=\"p\">,<\/span><span class=\"n\">match2scorers<\/span><span class=\"p\">,<\/span><span class=\"n\">match3scorers<\/span><span class=\"p\">])<\/span> \r\n<span class=\"n\">AllScorers<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"output_wrapper\">\n<div class=\"output\">\n<div class=\"output_area\">\n<div class=\"prompt output_prompt\">Out[3]:<\/div>\n<div class=\"output_html rendered_html output_subarea output_execute_result\">\n<div>\n<style>\n    .dataframe thead tr:only-child th {\n        text-align: right;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: left;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n<\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th><\/th>\n<th>First<\/th>\n<th>Last<\/th>\n<th>Opponent<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>Sally<\/td>\n<td>Billy<\/td>\n<td>Selche FC<\/td>\n<\/tr>\n<tr>\n<th>0<\/th>\n<td>Sally<\/td>\n<td>Pip<\/td>\n<td>Sudaton FC<\/td>\n<\/tr>\n<tr>\n<th>0<\/th>\n<td>Sally<\/td>\n<td>Sally<\/td>\n<td>Ouestjambon United<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing code_cell rendered\">\n<div class=\"input\">\n<div class=\"prompt input_prompt\">In&nbsp;[4]:<\/div>\n<div class=\"inner_cell\">\n<div class=\"input_area\">\n<div class=\" highlight hl-ipython3\">\n<pre><span><\/span><span class=\"n\">pd<\/span><span class=\"o\">.<\/span><span class=\"n\">merge<\/span><span class=\"p\">(<\/span><span class=\"n\">AllMatches<\/span><span class=\"p\">,<\/span> <span class=\"n\">AllScorers<\/span><span class=\"p\">,<\/span> <span class=\"n\">how<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;inner&#39;<\/span><span class=\"p\">,<\/span><span class=\"n\">on<\/span><span class=\"o\">=<\/span><span class=\"s1\">&#39;Opponent&#39;<\/span><span class=\"p\">)<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"output_wrapper\">\n<div class=\"output\">\n<div class=\"output_area\">\n<div class=\"prompt output_prompt\">Out[4]:<\/div>\n<div class=\"output_html rendered_html output_subarea output_execute_result\">\n<div>\n<style>\n    .dataframe thead tr:only-child th {\n        text-align: right;\n    }<\/p>\n<p>    .dataframe thead th {\n        text-align: left;\n    }<\/p>\n<p>    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n<\/style>\n<table border=\"1\" class=\"dataframe\">\n<thead>\n<tr style=\"text-align: right;\">\n<th><\/th>\n<th>Attendance<\/th>\n<th>GoalsAgainst<\/th>\n<th>GoalsFor<\/th>\n<th>Opponent<\/th>\n<th>First<\/th>\n<th>Last<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>0<\/th>\n<td>53225<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>Selche FC<\/td>\n<td>Sally<\/td>\n<td>Billy<\/td>\n<\/tr>\n<tr>\n<th>1<\/th>\n<td>53256<\/td>\n<td>0<\/td>\n<td>3<\/td>\n<td>Sudaton FC<\/td>\n<td>Sally<\/td>\n<td>Pip<\/td>\n<\/tr>\n<tr>\n<th>2<\/th>\n<td>53225<\/td>\n<td>1<\/td>\n<td>4<\/td>\n<td>Ouestjambon United<\/td>\n<td>Sally<\/td>\n<td>Sally<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing text_cell rendered\">\n<div class=\"prompt input_prompt\">\n<\/div>\n<div class=\"inner_cell\">\n<div class=\"text_cell_render border-box-sizing rendered_html\">\n<p>Let&#8217;s break down &#8216;pd.merge()&#8217;. Anyone with any SQL experience will have a head start here, as this essentially mimicks merging in SQL.<\/p>\n<p>&#8216;pd.merge()&#8217; takes four arguments. The first two are the dataFrames that we want to merge.<\/p>\n<p>Next, we have the &#8216;how&#8217; argument, which dictates the type of join that we need. &#8216;Inner&#8217; is the simplest, and we use that in this example but you should read up on the other types.<\/p>\n<p>Finally is &#8216;on&#8217;, which is the column that we build the dataFrame around. Pandas looks for this value in all merged dataFrames, then adds the other values from the matching rows.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"cell border-box-sizing text_cell rendered\">\n<div class=\"prompt input_prompt\">\n<\/div>\n<div class=\"inner_cell\">\n<div class=\"text_cell_render border-box-sizing rendered_html\">\n<h3 id=\"Summary\">Summary<\/h3>\n<p>With merge and concatenate, we have two examples of Pandas tools used to join datasets.<\/p>\n<p>Concatenation allows us to stitch together two datasets with the same columns. Useful if we are adding to an already-existing dataset or glueing together two iterations of data collection. It is much quicker than opening Excel and pasting the data manually!<\/p>\n<p>We have also seen an example of merge, which connects two datasets across a column that is common between the two dataFrames.<\/p>\n<p>These examples are relatively simple and only serve as an introduction to joining data. For more complex cases, check out resources on pandas.join() and more in-depth examples of pandas.merge()<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Incomplete data sets, whether they are missing individual values or full rows and columns, are a common problem in data analysis. Luckily for us,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[17],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Joining Data - FC Python<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fcpython.com\/data-analysis\/joining-data\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Joining Data - FC Python\" \/>\n<meta property=\"og:description\" content=\"Incomplete data sets, whether they are missing individual values or full rows and columns, are a common problem in data analysis. Luckily for us,&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fcpython.com\/data-analysis\/joining-data\" \/>\n<meta property=\"og:site_name\" content=\"FC Python\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-29T10:34:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-18T20:10:10+00:00\" \/>\n<meta name=\"author\" content=\"FCPythonADMIN\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@FC__Python\" \/>\n<meta name=\"twitter:site\" content=\"@FC__Python\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FCPythonADMIN\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated 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:\/\/fcpython.com\/data-analysis\/joining-data#article\",\"isPartOf\":{\"@id\":\"https:\/\/fcpython.com\/data-analysis\/joining-data\"},\"author\":{\"name\":\"FCPythonADMIN\",\"@id\":\"https:\/\/fcpython.com\/#\/schema\/person\/ed81e5728929acd0f3f2d9bf824a0bd0\"},\"headline\":\"Joining Data\",\"datePublished\":\"2017-12-29T10:34:50+00:00\",\"dateModified\":\"2020-12-18T20:10:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fcpython.com\/data-analysis\/joining-data\"},\"wordCount\":419,\"publisher\":{\"@id\":\"https:\/\/fcpython.com\/#organization\"},\"keywords\":[\"Pandas\"],\"articleSection\":[\"Data Analysis\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fcpython.com\/data-analysis\/joining-data\",\"url\":\"https:\/\/fcpython.com\/data-analysis\/joining-data\",\"name\":\"Joining Data - FC Python\",\"isPartOf\":{\"@id\":\"https:\/\/fcpython.com\/#website\"},\"datePublished\":\"2017-12-29T10:34:50+00:00\",\"dateModified\":\"2020-12-18T20:10:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fcpython.com\/data-analysis\/joining-data#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fcpython.com\/data-analysis\/joining-data\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fcpython.com\/data-analysis\/joining-data#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fcpython.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Joining Data\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fcpython.com\/#website\",\"url\":\"https:\/\/fcpython.com\/\",\"name\":\"FC Python\",\"description\":\"Learning Python through football\",\"publisher\":{\"@id\":\"https:\/\/fcpython.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fcpython.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fcpython.com\/#organization\",\"name\":\"FC Python\",\"url\":\"https:\/\/fcpython.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/fcpython.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fcpython.com\/wp-content\/uploads\/2017\/12\/Logocomp9.png\",\"contentUrl\":\"https:\/\/fcpython.com\/wp-content\/uploads\/2017\/12\/Logocomp9.png\",\"width\":981,\"height\":1049,\"caption\":\"FC Python\"},\"image\":{\"@id\":\"https:\/\/fcpython.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/FC__Python\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/fcpython.com\/#\/schema\/person\/ed81e5728929acd0f3f2d9bf824a0bd0\",\"name\":\"FCPythonADMIN\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/fcpython.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7a172a6f730270fc0f8bb1a8ff958895?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7a172a6f730270fc0f8bb1a8ff958895?s=96&d=mm&r=g\",\"caption\":\"FCPythonADMIN\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Joining Data - FC Python","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:\/\/fcpython.com\/data-analysis\/joining-data","og_locale":"en_GB","og_type":"article","og_title":"Joining Data - FC Python","og_description":"Incomplete data sets, whether they are missing individual values or full rows and columns, are a common problem in data analysis. Luckily for us,&hellip;","og_url":"https:\/\/fcpython.com\/data-analysis\/joining-data","og_site_name":"FC Python","article_published_time":"2017-12-29T10:34:50+00:00","article_modified_time":"2020-12-18T20:10:10+00:00","author":"FCPythonADMIN","twitter_card":"summary_large_image","twitter_creator":"@FC__Python","twitter_site":"@FC__Python","twitter_misc":{"Written by":"FCPythonADMIN","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fcpython.com\/data-analysis\/joining-data#article","isPartOf":{"@id":"https:\/\/fcpython.com\/data-analysis\/joining-data"},"author":{"name":"FCPythonADMIN","@id":"https:\/\/fcpython.com\/#\/schema\/person\/ed81e5728929acd0f3f2d9bf824a0bd0"},"headline":"Joining Data","datePublished":"2017-12-29T10:34:50+00:00","dateModified":"2020-12-18T20:10:10+00:00","mainEntityOfPage":{"@id":"https:\/\/fcpython.com\/data-analysis\/joining-data"},"wordCount":419,"publisher":{"@id":"https:\/\/fcpython.com\/#organization"},"keywords":["Pandas"],"articleSection":["Data Analysis"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/fcpython.com\/data-analysis\/joining-data","url":"https:\/\/fcpython.com\/data-analysis\/joining-data","name":"Joining Data - FC Python","isPartOf":{"@id":"https:\/\/fcpython.com\/#website"},"datePublished":"2017-12-29T10:34:50+00:00","dateModified":"2020-12-18T20:10:10+00:00","breadcrumb":{"@id":"https:\/\/fcpython.com\/data-analysis\/joining-data#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fcpython.com\/data-analysis\/joining-data"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fcpython.com\/data-analysis\/joining-data#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fcpython.com\/"},{"@type":"ListItem","position":2,"name":"Joining Data"}]},{"@type":"WebSite","@id":"https:\/\/fcpython.com\/#website","url":"https:\/\/fcpython.com\/","name":"FC Python","description":"Learning Python through football","publisher":{"@id":"https:\/\/fcpython.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fcpython.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/fcpython.com\/#organization","name":"FC Python","url":"https:\/\/fcpython.com\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/fcpython.com\/#\/schema\/logo\/image\/","url":"https:\/\/fcpython.com\/wp-content\/uploads\/2017\/12\/Logocomp9.png","contentUrl":"https:\/\/fcpython.com\/wp-content\/uploads\/2017\/12\/Logocomp9.png","width":981,"height":1049,"caption":"FC Python"},"image":{"@id":"https:\/\/fcpython.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/FC__Python"]},{"@type":"Person","@id":"https:\/\/fcpython.com\/#\/schema\/person\/ed81e5728929acd0f3f2d9bf824a0bd0","name":"FCPythonADMIN","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/fcpython.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7a172a6f730270fc0f8bb1a8ff958895?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7a172a6f730270fc0f8bb1a8ff958895?s=96&d=mm&r=g","caption":"FCPythonADMIN"}}]}},"_links":{"self":[{"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/posts\/137"}],"collection":[{"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":1,"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/posts\/137\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fcpython.com\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}