Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Wrangling with Python

You're reading from   Data Wrangling with Python Creating actionable data from raw sources

Arrow left icon
Product type Paperback
Published in Feb 2019
Publisher Packt
ISBN-13 9781789800111
Length 452 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Shubhadeep Roychowdhury Shubhadeep Roychowdhury
Author Profile Icon Shubhadeep Roychowdhury
Shubhadeep Roychowdhury
Dr. Tirthajyoti Sarkar Dr. Tirthajyoti Sarkar
Author Profile Icon Dr. Tirthajyoti Sarkar
Dr. Tirthajyoti Sarkar
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Data Wrangling with Python
Preface
1. Introduction to Data Wrangling with Python 2. Advanced Data Structures and File Handling FREE CHAPTER 3. Introduction to NumPy, Pandas, and Matplotlib 4. A Deep Dive into Data Wrangling with Python 5. Getting Comfortable with Different Kinds of Data Sources 6. Learning the Hidden Secrets of Data Wrangling 7. Advanced Web Scraping and Data Gathering 8. RDBMS and SQL 9. Application of Data Wrangling in Real Life Appendix

Activity 13: Data Wrangling Task – Cleaning GDP Data


The GDP data is available on https://data.worldbank.org/ and it is available on GitHub at https://github.com/TrainingByPackt/Data-Wrangling-with-Python/blob/master/Chapter09/Activity12-15/India_World_Bank_Info.csv.

In this activity, we will clean the GDP data.

  1. Create three DataFrames from the original DataFrame using filtering. Create the df_primary, df_secondary, and df_tertiary DataFrames for students enrolled in primary education, secondary education, and tertiary education in thousands, respectively.

  2. Plot bar charts of the enrollment of primary students in a low-income country like India and a higher-income country like the USA.

  3. Since there is missing data, use pandas imputation methods to impute these data points by simple linear interpolation between data points. To do that, create a DataFrame with missing values inserted and append a new DataFrame with missing values to the current DataFrame.

  4. (For India) Append the rows corresponding...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image