Web Scraping is not only fun - it enables you to get data from the any webpage and do your own analysis on the data.
With the pandas library in Python you can do that in two steps and have the data prepared for further processing.
First - get the URL of the page and use pandas read_html to parse the data from the webpage into a list of DataFrames.
Second - Data Wrangling - which means to transform the data to be in the right format for further processing. That can be extracting numeric values from entries like: "$ 1,234,567" or converting dates to date-objects.
In this lesson you will learn how to do that easily with the pandas library using DataFrames.
L E S S O N O B J E C T I V E S
• Understand what Web Scraping is
• How to use the pandas library to Web Scrape
• Understand legal issues with Web Scraping
• Demonstrate the challenge with data after Web Scraping
• Learn what Data Wrangling is
• How to see the data types of Web Data
• How to convert data to numeric values in a DataFrame
• To extract values from strings from DataFrame
• Error handling while converting DataFrames
C O U R S E D E S C R I P T I O N
• Data Science with Python - A beginners course covering all you need
• A 12 hour full course with Python for Data Science.
• Including Jupyter Notebooks and projects.
C O U R S E R E S O U R C E S
▸ Course Page: https://www.learnpythonwithrune.org/data-science-2/
▸ GitHub (Notebooks): https://github.com/LearnPythonWithRune/DataScienceWithPython
▸ Anaconda: https://www.anaconda.com/products/individual
F U L L C O U R S E
The course is structured in 15 lessons with 15 projects covering the full Data Science Workflow. It has focus on teaching what adds value and how to create projects with the most efficient tech stack.
T I M E S T A M P S
00:00 Web Scraping Made Easy
00:43 Overview
02:07 What is Web Scraping and legal issues
03:38 Web Scraping example: A page to scrape
05:01 Web Scraping with pandas on example
06:19 Inspecting the result from Web Scraping
07:55 Exploring the data types in DataFrame
08:31 Extracting values from strings in DataFrame column
10:52 Convert DataFrame column to numeric value
12:14 Data Wrangling
13:09 What about errors in data?
15:31 How to handle errors with to_numeric
19:12 Project Description
24:34 Project Solution
25:07 Step 1
26:20 Step 2 a & b & c
28:31 Step 2 d & e
31:18 Step 2 f & g
35:17 Next Lesson
C O U R S E L E A R N I N G O B J E C T I V E S
• Master the Data Science Workflow
• Data Visualization
• pandas for Data Science
• Data Sources
• Web Scraping
• Databases
• CSV, Excel & parquet files
• Where to find data
• Join (combine) data
• Statistics you need to know
• Machine Learning Models
• Linear Regression
• Classification
• …also check out the Machine Learning Course
• Cleaning Data
• Feature Scaling
• Feature Selection
Model Selection
F R E E Y O U T U B E C O U R S E S
▸ Learn Python: https://www.learnpythonwithrune.org/learn-python/
▸ Machine Learning: https://www.learnpythonwithrune.org/machine-learning/
▸ Financial Analysis: https://www.learnpythonwithrune.org/start-python-with-pandas-for-financial-analysis/
▸ Risk and Return: https://www.learnpythonwithrune.org/python-for-finance-risk-and-return/
S T A Y C O N N E C T E D
▸ Facebook: https://www.facebook.com/learnpythonwithrune
▸ Twitter: https://twitter.com/PythonWithRune
▸ Blog: http://learnpythonwithrune.org
▸ Online courses: https://www.learnpythonwithrune.org/my-online-courses/