Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
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 FREE CHAPTER 2. Advanced Data Structures and File Handling 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

Summary


In this topic, we looked at the structure of an HTML document. HTML documents are the cornerstone of the World Wide Web and, given the amount of data that's contained on it, we can easily infer the importance of HTML as a data source.

We learned about bs4 (BeautifulSoup4), a Python library that gives us Pythonic ways to read and query HTML documents. We used bs4 to load an HTML document and also explored several different ways to navigate the loaded document. We also got necessary information about the difference between all of these methods.

We looked at how we can create a pandas DataFrame from an HTML document (which contains a table). Although there are some built-in ways to do this job in pandas, they fail as soon as the target table is encoded inside a complex hierarchy of elements. So, the knowledge we gathered in this topic by transforming an HTML table into a pandas DataFrame in a step-by-step manner is invaluable.

Finally, we looked at how we can create a stack in our code...

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