I have these data sets (A) Emissions Year Country Continent Emission 0 2008 Aruba South America 24.750133 1 2009 Aruba South America 24.876706 2 2010 Aruba South America 24.182702 3 2011 Aruba South America 23.922412 4 2008 Andorra Europe 6.296125 .. ... ... ... ... 783 2011 Zambia Africa 0.212450 784 2008 Zimbabwe Africa 0.569255 785 2009 Zimbabwe Africa 0.600521 786 2010 Zimbabwe Africa 0.646073 787 2011 Zimbabwe Africa 0.691698 (B) Gap_long Country Year Population 0 Afghanistan 2008 27700000 1 Albania 2008 3000000 2 Algeria 2008 34700000 3 Andorra 2008 83900 4 Angola 2008 21700000 .. ... ... ... 775 Venezuela 2011 28900000 776 Vietnam 2011 88900000 777 Yemen 2011 23800000 778 Zambia 2011 14000000 779 Zimbabwe 2011 12900000 Using pandas in python code How do I create a new dataframe that only contains the rows that were present in both emissions and gap_long . Name this dataframe emissions_both. I was given this Hint by another user: Looking at the _merge column may be helpful. I have tried over and over again and all I get is either an error or a wrong answer. The error states that "AssertionError: Your dataframe dimensions are incorrect. Are you selecting rows that present in both dataframes?" Please help. I have tried over and over again and all I get is the assertion error

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I have these data sets

(A) Emissions

Year Country Continent Emission 0 2008 Aruba South America 24.750133 1 2009 Aruba South America 24.876706 2 2010 Aruba South America 24.182702 3 2011 Aruba South America 23.922412 4 2008 Andorra Europe 6.296125 .. ... ... ... ... 783 2011 Zambia Africa 0.212450 784 2008 Zimbabwe Africa 0.569255 785 2009 Zimbabwe Africa 0.600521 786 2010 Zimbabwe Africa 0.646073 787 2011 Zimbabwe Africa 0.691698

(B) Gap_long

Country Year Population 0 Afghanistan 2008 27700000 1 Albania 2008 3000000 2 Algeria 2008 34700000 3 Andorra 2008 83900 4 Angola 2008 21700000 .. ... ... ... 775 Venezuela 2011 28900000 776 Vietnam 2011 88900000 777 Yemen 2011 23800000 778 Zambia 2011 14000000 779 Zimbabwe 2011 12900000

Using pandas in python code

How do I create a new dataframe that only contains the rows that were present in both emissions and gap_long . Name this dataframe emissions_both. I was given this Hint by another user: Looking at the _merge column may be helpful. I have tried over and over again and all I get is either an error or a wrong answer. The error states that "AssertionError: Your dataframe dimensions are incorrect. Are you selecting rows that present in both dataframes?" Please help. I have tried over and over again and all I get is the assertion error

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Intelligent Machines
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education