03 2020 档案
摘要:1.目标是爬取腾讯国内外疫情数据 2.对爬取的数据进行数据清洗 3.清洗后数据的分析和可视化 实现思路:1.到所要爬取的网页使用f12查看源代码,查找所要爬取的数据的路据 2.使用get或post进行数据的爬取 3.提取有用的数据 4.使用pandas库将数据转换为二维表 5.使用pandas库进行
阅读全文
摘要:import requests from bs4 import BeautifulSoup import bs4 import pandas as pd url = 'http://top.baidu.com/buzz?b=341&c=513&fr=topbuzz_b1' headers = {'U
阅读全文