from the web
I N T E R M E D I AT E I M P O R T I N G D ATA I N P Y
Hugo Bowne-Anderson
Data Scientist at DataCamp
,You’re already great at importing!
Flat les such as .txt and .csv
Pickled les, Excel spreadsheets, and many others!
Data from relational databases
You can do all these locally
What if your data is online?
,Can you import web data?
You can: go to URL and click to download les
BUT: not reproducible, not scalable
, You’ll learn how to…
Import and locally save datasets from the web
Load datasets into pandas DataFrames
Make HTTP requests (GET requests)
Scrape web data such as HTML
Parse HTML into useful data (BeautifulSoup)
Use the urllib and requests packages