I'm working with dataframes on Python, I'm having trouble joining two dataframes. A dataframe is related to information from countries around the world. Another dataframe is related to the detailed information of one of the countries of the world of the previous dataframe (i.e. I'm going to add information on the regions, provinces, municipalities). I created a script that merged the headers of the two data frames, the problem now is how to make a very distant comparison between the information of the second dataframe only in the field of the country in question?
My idea of a pseudo code was to first add 'len (dataframe2)' lines equal to dataframe1 related to the country information of which I then have the second detailed dataframe. How do I get that information right? This is what I would like to do (see photos)