Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Store Scraped Data Into a Pandas DataFrame | Best Practices: Web Scraping
Best Practices: Web Scraping
course content

Зміст курсу

Best Practices: Web Scraping

Store Scraped Data Into a Pandas DataFrame

Storing scraped data in a pandas DataFrame is a convenient way to manipulate and work with the data. pandas is a powerful library in Python that provides easy-to-use data structures and data analysis tools.

A DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it as a spreadsheet, SQL table, or a dictionary of Series objects. It is generally the most commonly used pandas object.

Завдання

  1. Import pandas and initialize an empty DF;
  2. Scrape the country name (find all instances on the web page);
  3. Scrape the capital city (find all instances on the web page);
  4. Append the scraped values (country_name, item) in the df.

Завдання

  1. Import pandas and initialize an empty DF;
  2. Scrape the country name (find all instances on the web page);
  3. Scrape the capital city (find all instances on the web page);
  4. Append the scraped values (country_name, item) in the df.

Mark tasks as Completed
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Storing scraped data in a pandas DataFrame is a convenient way to manipulate and work with the data. pandas is a powerful library in Python that provides easy-to-use data structures and data analysis tools.

A DataFrame is a 2-dimensional labeled data structure with columns of potentially different types. You can think of it as a spreadsheet, SQL table, or a dictionary of Series objects. It is generally the most commonly used pandas object.

Завдання

  1. Import pandas and initialize an empty DF;
  2. Scrape the country name (find all instances on the web page);
  3. Scrape the capital city (find all instances on the web page);
  4. Append the scraped values (country_name, item) in the df.

Mark tasks as Completed
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 5
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt