如何用python爬取网站数据nba数据中心的数据

拒绝访问 |
| 百度云加速
请打开cookies.
此网站 () 的管理员禁止了您的访问。原因是您的访问包含了非浏览器特征(3b97caf2c75d438e-ua98).
重新安装浏览器,或使用别的浏览器用Python爬虫获取NBA球员的生涯数据
NBA球迷往往对球员的各项数据以及对应的排名很感兴趣,而这个网站的数据十分详尽。为方便浏览,我在github建了一个项目,借助该网站提供的数据来汇总某个球员的最新生涯数据,。本文介绍一下思路和使用方法。
思路非常简单,首先使用requests库来抓取相关的网页,之后用beautifulsoup这个库来解析html文件,用以解析所需的数据。
Windows可执行程序的使用
首先从下载压缩包,解压后得到nbarecord.exe这个可执行文件。之后在Windows命令行中执行该文件,并将球员名字作为参数,就可以得到对应的各项统计数据。假设该可执行文件存储在E盘,若想获取詹姆斯的各项统计,可以执行如下命令获取:
PS C:\Users\lxb& cd e:
PS E:\& .\nbarecord.exe "LeBron James"
Retrieving data from: http://www./leaders/pts_career.html...
&Response [200]&
Retrieving data from: http://www./leaders/trb_career.html...
&Response [200]&
Retrieving data from: http://www./leaders/blk_career.html...
&Response [200]&
Retrieving data from: http://www./leaders/ast_career.html...
&Response [200]&
Retrieving data from: http://www./leaders/stl_career.html...
&Response [200]&
Retrieving data from: http://www./leaders/fg3_career.html...
&Response [200]&
Points(得分):
Kareem Abdul-Jabbar
Karl Malone
Kobe Bryant
Michael Jordan
Wilt Chamberlain
Dirk Nowitzki
Shaquille O'Neal
LeBron James
-----------------Last Time------------------
LeBron James
--------------------------------------------
Rebounds(篮板):
Chris Webber
Lamar Odom
Bob McAdoo
Larry Foust
Happy Hairston
John Havlicek
Oscar Robertson
Sam Perkins
Caldwell Jones
Antonio McDyess
Chris Bosh
Wayne Embry
Maurice Lucas
Paul Pierce
Scottie Pippen
James Donaldson
Al Jefferson
Juwan Howard
LeBron James
-----------------Last Time------------------
LeBron James
--------------------------------------------
Blocks(封盖):
Roy Hinson
Rony Seikaly
James Edwards
Kenyon Martin
Paul Millsap
Dave Corzine
Donyell Marshall
Kurt Thomas
Danny Schayes
Joakim Noah
Joel Przybilla
Alex English
Marvin Webster
Joe Meriweather
Alvan Adams
Tracy McGrady
Jerome Kersey
LeBron James
-----------------Last Time------------------
LeBron James
--------------------------------------------
Assists(助攻):
John Stockton
Jason Kidd
Steve Nash
Mark Jackson
Magic Johnson
Oscar Robertson
Isiah Thomas
Gary Payton
Andre Miller
Chris Paul
Rod Strickland
Maurice Cheeks
Lenny Wilkens
LeBron James
-----------------Last Time------------------
LeBron James
--------------------------------------------
Steals(抢断):
Jason Kidd
Michael Jordan
Gary Payton
Maurice Cheeks
Scottie Pippen
Clyde Drexler
Hakeem Olajuwon
Alvin Robertson
Karl Malone
Mookie Blaylock
Allen Iverson
Derek Harper
Kobe Bryant
Chris Paul
Isiah Thomas
Kevin Garnett
Shawn Marion
Paul Pierce
Magic Johnson
LeBron James
-----------------Last Time------------------
LeBron James
--------------------------------------------
3-pt Field Goals(三分命中数):
Kyle Korver
Joe Johnson
Chauncey Billups
Kobe Bryant
Stephen Curry
Rashard Lewis
Peja Stojakovic
Dirk Nowitzki
J.R. Smith
Dale Ellis
Steve Nash
Jason Richardson
Mike Miller
Eddie Jones
Tim Hardaway
Nick Van Exel
Mike Bibby
Michael Finley
LeBron James
-----------------Last Time------------------
LeBron James
--------------------------------------------
程序运行时,会从网站爬取最新的数据,显示球员当前所获得的成就,并显示他最近需要超越的一些球员(最多显示之前20个球员)。Last Time 这一栏显示上一次执行程序获取的该球员相应数据,这样一来可以了解到球员在最近的比赛后取得的进展。注意:球员名字需要按照这个网站提供的资料来作为输入。
通过Python环境运行
首先clone一份代码:
git clone /schnauzers/predict.git
本项目用Python3编写,因此你需要一个Python3环境(或者用pyenv虚拟)。请安装如下几个依赖库:
pip install requests bs4 lxml colorama
之后将球员名字作为参数来执行脚本,便可获取相应的数据:
python getrecord.py "LeBron James"
Linux下通过邮件自动通知数据更新
如果拥有一个Linux环境,则可以通过crontab,mail等工具,利用Linux管道,结合本程序,每天获取关注球员的最新数据,并将数据发送到自己的邮箱。实现也很简单,举例如下:首先通过crontab -e命令,打开编辑窗口,之后在编辑器里输入如下内容(请自行修改代码路径和自己的邮箱地址):
0 20 * * * python3 /home/predict/getpage.py "LeBron James" | mail -s "Data of LeBron today" YourEmail@domain.cc
这样便可以在每天晚上20:00收到关于詹姆斯最新的生涯数据了(注意在自己邮箱里设置白名单,防止被当做垃圾邮件)。
“Dr信用牛牛”让你远离信用污点
国内首家信用健康管理平台免费为你提供信用修复方案安全检查中...
请打开浏览器的javascript,然后刷新浏览器
< 浏览器安全检查中...
还剩 5 秒&python爬虫+数据分析之NBA球员LBJ13个赛季的数据分析 - CSDN博客
python爬虫+数据分析之NBA球员LBJ13个赛季的数据分析
python爬虫
最近在看数据分析的书籍,想着自己分析一点东西来,本人比较喜欢NBA,自然就先拿NBA作为分析的对象了,首先要获得最全的NBA数据,根据搜索的结果对比发现,该网站的数据非常全面详细,真是业界良心。
数据源找到后第一件事情自然就是获取数据,这里用python的原生代码直接爬取的,个人觉的,beautifulSoup还是比较好的,只是一开始没有用,也就后来没用了,废话少叙,直接上代码。
import urllib
import csv
import sys
list0 = []
list1 = []
list2 = []
list3 = []
list4 = []
list5 = []
list6 = []
list7 = []
list8 = []
list9 = []
list10 = []
list11 = []
list12 = []
list13 = []
list14 = []
list15 = []
list16 = []
list17 = []
list18 = []
list19 = []
list20 = []
list21 = []
list22 = []
list23 = []
list24 = []
list25 = []
list26 = []
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
return html
for k in range(0,51):
html = getHtml(
"http://www./query.php?QueryType=game&GameType=season&Player_id=1862&crtcol=season&order=1&page=" + str(
playerdata = re.findall(r'&td
class ="normal player_name_out change_color col1 row.+"&&a.*&(.*)&/a&&/td&'
class ="current season change_color col2 row.+"&&a.*&(.*)&/a&&/td&'
class ="normal wl change_color col3 row.+"&(.*)&/td&'
class ="normal result_out change_color col4 row.+"&&a.*&(\D*|76人)(\d+)-(\d+)(\D*)&/a&&/td&'
class ="normal gs change_color col5 row.+"&(.*)&/td&'
class ="normal mp change_color col6 row.+"&(.*)&/td&'
class ="normal fgper change_color col7 row.+"&(.*%|\s*)&/td&'
class ="normal fg change_color col8 row.+"&(.*)&/td&'
class ="normal fga change_color col9 row.+"&(.*)&/td&'
class ="normal threepper change_color col10 row.+"&(.*%|\s*)&/td&'
class ="normal threep change_color col11 row.+"&(.*)&/td&'
class ="normal threepa change_color col12 row.+"&(.*)&/td&'
class ="normal ftper change_color col13 row.+"&(.*%|\s*)&/td&'
class ="normal ft change_color col14 row.+"&(.*)&/td&'
class ="normal fta change_color col15 row.+"&(.*)&/td&'
class ="normal trb change_color col16 row.+"&(.*)&/td&'
class ="normal orb change_color col17 row.+"&(.*)&/td&'
class ="normal drb change_color col18 row.+"&(.*)&/td&'
class ="normal ast change_color col19 row.+"&(.*)&/td&'
class ="normal stl change_color col20 row.+"&(.*)&/td&'
class ="normal blk change_color col21 row.+"&(.*)&/td&'
class ="normal tov change_color col22 row.+"&(.*)&/td&'
class ="normal pf change_color col23 row.+"&(.*)&/td&'
class ="normal pts change_color col24 row.+"&(.*)&/td&', html)
for data in playerdata:
data1 = [data[0], data[1], data[2], data[3], int(data[4]), data[5], data[6], data[7], data[8], data[9],
data[10], data[11], data[12], data[13], data[14], data[15], data[16], data[17], data[18], data[19],
data[20], data[21], data[22], data[23], data[24], data[25], data[26]]
if (data1[15] == ' '):
data1[15] = 0
data1[15] = float("".join(re.findall(r'(.*)%', data1[15])))
if (data1[9] == ' '):
data1[9] = 0
data1[9] = float("".join(re.findall(r'(.*)%', data1[9])))
if (data1[12] == ' '):
data1[12] = 0
data1[12] = float("".join(re.findall(r'(.*)%', data1[12])))
list0.append(data1[0])
list1.append(data1[1])
list2.append(data1[2])
list3.append(data1[3])
list4.append(data1[4])
list5.append(data1[5])
list6.append(data1[6])
list7.append(data1[7])
list8.append(data1[8])
list9.append(data1[9])
list10.append(data1[10])
list11.append(data1[11])
list12.append(data1[12])
list13.append(data1[13])
list14.append(data1[14])
list15.append(data1[15])
list16.append(data1[16])
list17.append(data1[17])
list18.append(data1[18])
list19.append(data1[19])
list20.append(data1[20])
list21.append(data1[21])
list22.append(data1[22])
list23.append(data1[23])
list24.append(data1[24])
list25.append(data1[25])
list26.append(data1[26])
count += 1
csvfile = file('nbadata.csv', 'ab+')
writer = csv.writer(csvfile)
data2 = []
for i in range(0,count):
data2.append((list0[i],list1[i],list2[i],list3[i],list4[i],list5[i],list6[i],list7[i],list8[i]
,list9[i],list10[i],list11[i],list12[i],list13[i],list14[i],list15[i],list16[i]
,list17[i],list18[i],list19[i],list20[i],list21[i],list22[i],list23[i],list24[i]
, list25[i],list26[i]))
writer.writerows(data2)
csvfile.close()
经过爬取数据后得到了nbadata.csv文件,数据到手,下面就是分析了。
数据分析及可视化
这里只是简单的对LBJ职业生涯常规赛数据进行了分析,时间有限,就做了两个分析,一个是对常规赛的得分相同的次数进行统计。得出每个的分段的得分总次数;另一个是对过去13个赛季的五项能力(包括得分、篮板、助攻、盖帽、抢断)进行分析得出13个能力值图。
可视化部分应用的是flask框架搭建的web网站,前端用百度echart.js进行图像的搭建(强烈推荐echart,作图太666)
直接上代码:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
from flask import Flask,render_template
from flask_bootstrap import Bootstrap
from pandas import DataFrame,Series
import pandas as pd
import numpy as np
import csv
srcFilePath = "c:/myflask/nbadata.csv"
reader = csv.reader(file(srcFilePath,'rb'))
records = [line for line in reader]
frame = DataFrame(records)
pts_count = frame[26].value_counts()
for i in pts_count.keys():
a.append(i)
for i in pts_count:
b.append(i)
for i in range(0,len(a)):
c[int(a[i])] = int(b[i])
d = sorted(c.items(), key=lambda c:c[0])
for i in d:
e.append(i[0])
f.append(i[1])
records_p1 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '03-04']
records_p2 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '04-05']
records_p3 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '05-06']
records_p4 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '06-07']
records_p5 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '07-08']
records_p6 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '08-09']
records_p7 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '09-10']
records_p8 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '10-11']
records_p9 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '11-12']
records_p10 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '12-13']
records_p11 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '13-14']
records_p12 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '14-15']
records_p13 = [(int(line[26]),int(line[21]),int(line[18]),int(line[22]),int(line[23])) for line in records if line[1] == '15-16']
g1 = [float('%0.1f' % i) for i in DataFrame(records_p1).mean()]
g2 = [float('%0.1f' % i) for i in DataFrame(records_p2).mean()]
g3 = [float('%0.1f' % i) for i in DataFrame(records_p3).mean()]
g4 = [float('%0.1f' % i) for i in DataFrame(records_p4).mean()]
g5 = [float('%0.1f' % i) for i in DataFrame(records_p5).mean()]
g6 = [float('%0.1f' % i) for i in DataFrame(records_p6).mean()]
g7 = [float('%0.1f' % i) for i in DataFrame(records_p7).mean()]
g8 = [float('%0.1f' % i) for i in DataFrame(records_p8).mean()]
g9 = [float('%0.1f' % i) for i in DataFrame(records_p9).mean()]
g10 = [float('%0.1f' % i) for i in DataFrame(records_p10).mean()]
g11 = [float('%0.1f' % i) for i in DataFrame(records_p11).mean()]
g12 = [float('%0.1f' % i) for i in DataFrame(records_p12).mean()]
g13 = [float('%0.1f' % i) for i in DataFrame(records_p13).mean()]
app = Flask(__name__)
bootstrap = Bootstrap(app)
@app.route('/')
def hello_world():
return render_template('index.html', a=e, b=f, c1=g1,c2=g2,c3=g3,c4=g4,c5=g5,c6=g6,c7=g7,c8=g8,c9=g9,c10=g10,c11=g11,c12=g12,c13=g13)
if __name__ == '__main__':
app.run(debug=True)
index.html
{% extends "base.html" %}
{% block title %}Flasky{% endblock %}
{% block page_content %}
class="page-header"&
&数据分析&
id="main" style="height:400 width: auto"&&
id="main2" style="height:600 width: background-color: #333"&
id="s1" style="height:600 width: auto"&
src="../static/echarts.js"&&
src="../static/dark.js"&&
type="text/javascript"&
var myChart = echarts.init(document.getElementById('main'));
var option = {
text: '得分次数图',
subtext: '数据来源:www.'
tooltip: {
trigger: 'axis'
data: ['次数']
calculable: true,
type: 'category',
boundaryGap: false,
axisLabel: {
formatter: '{value}分',
rotate: 45,
data: {{ a }}
type: 'value',
axisLabel: {
formatter: '{value} 次数'
name: '次数',
type: 'bar',
data:{{ b }},
markPoint: {
{type: 'max', name: '最大次数'},
{type: 'min', name: '最小次数'}
myChart.setOption(option);
type="text/javascript"&
var myChart1 = echarts.init(document.getElementById('s1'),'dark');
option = {
data: ['03-04赛季', '04-05赛季', '05-06赛季', '06-07赛季', '07-08赛季'
, '08-09赛季', '09-10赛季', '10-11赛季', '11-12赛季', '12-13赛季', '13-14赛季'
, '14-15赛季', '15-16赛季'],
textStyle:{
fontSize:8,
indicator: [
{name: '得分', max: 28.0},
{name: '助攻', max: 9.2},
{name: '篮板', max: 13.9},
{name: '抢断', max: 2.4},
{name: '盖帽', max: 3.6}
center: ['10%', '25%'],
radius: 80,
textStyle: {
color:'#67d15d',
fontSize: 6
indicator: [
{name: '得分', max: 30.7},
{name: '助攻', max: 11.5},
{name: '篮板', max: 13.5},
{name: '抢断', max: 2.9},
{name: '盖帽', max: 3.0}
center: ['30%', '25%'],
radius: 80,
textStyle: {
color:'#d1c373',
fontSize: 6
indicator: [
{name: '得分', max: 35.4},
{name: '助攻', max: 10.5},
{name: '篮板', max: 12.7},
{name: '抢断', max: 2.3},
{name: '盖帽', max: 3.2}
center: ['50%', '25%'],
radius: 80,
textStyle: {
color:'#d16a62',
fontSize: 6
indicator: [
{name: '得分', max: 31.6},
{name: '助攻', max: 11.6},
{name: '篮板', max: 12.8},
{name: '抢断', max: 2.1},
{name: '盖帽', max: 3.3}
center: ['70%', '25%'],
radius: 80,
textStyle: {
color:'#d170b6',
fontSize: 6
indicator: [
{name: '得分', max: 30.0},
{name: '助攻', max: 11.6},
{name: '篮板', max: 14.2},
{name: '抢断', max: 2.7},
{name: '盖帽', max: 3.6}
center: ['90%', '25%'],
radius: 80,
textStyle: {
color:'#8f45d1',
fontSize: 6
indicator: [
{name: '得分', max: 30.2},
{name: '助攻', max: 11.0},
{name: '篮板', max: 13.8},
{name: '抢断', max: 2.8},
{name: '盖帽', max: 2.9}
center: ['10%', '55%'],
radius: 80,
textStyle: {
color:'#4048d1',
fontSize: 6
indicator: [
{name: '得分', max: 30.1},
{name: '助攻', max: 11.0},
{name: '篮板', max: 13.2},
{name: '抢断', max: 2.3},
{name: '盖帽', max: 2.8}
center: ['30%', '55%'],
radius: 80,
textStyle: {
color:'#d11872',
fontSize: 6
indicator: [
{name: '得分', max: 27.7},
{name: '助攻', max: 11.4},
{name: '篮板', max: 15.2},
{name: '抢断', max: 2.4},
{name: '盖帽', max: 2.6}
center: ['50%', '55%'],
radius: 80,
textStyle: {
color:'#d1c80e',
fontSize: 6
indicator: [
{name: '得分', max: 28.0},
{name: '助攻', max: 11.7},
{name: '篮板', max: 14.5},
{name: '抢断', max: 2.5},
{name: '盖帽', max: 3.7}
center: ['70%', '55%'],
radius: 80,
textStyle: {
color:'#09e8ac',
fontSize: 6
indicator: [
{name: '得分', max: 28.7},
{name: '助攻', max: 9.7},
{name: '篮板', max: 12.4},
{name: '抢断', max: 2.4},
{name: '盖帽', max: 3.0}
center: ['90%', '55%'],
radius: 80,
textStyle: {
color:'#9c8eca',
fontSize: 6
indicator: [
{name: '得分', max: 32.0},
{name: '助攻', max: 10.7},
{name: '篮板', max: 13.7},
{name: '抢断', max: 2.5},
{name: '盖帽', max: 2.8}
center: ['10%', '85%'],
radius: 80,
textStyle: {
color:'#a6fdaa',
fontSize: 6
indicator: [
{name: '得分', max: 28.1},
{name: '助攻', max: 10.2},
{name: '篮板', max: 15.0},
{name: '抢断', max: 2.3},
{name: '盖帽', max: 2.9}
center: ['30%', '85%'],
radius: 80,
textStyle: {
color:'#faa60d',
fontSize: 6
indicator: [
{name: '得分', max: 30.1},
{name: '助攻', max: 11.7},
{name: '篮板', max: 14.8},
{name: '抢断', max: 2.1},
{name: '盖帽', max: 3.7}
center: ['50%', '85%'],
radius: 80,
textStyle: {
color:'#72ACD1',
fontSize: 6
name: '03-04赛季',
type: 'radar',
radarIndex: 0,
textStyle:{
color:'#fff'
value : {{ c1 }},
name : '03-04赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '04-05赛季',
type: 'radar',
radarIndex: 1,
textStyle:{
color:'#fff'
value : {{ c2 }},
name : '04-05赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '05-06赛季',
type: 'radar',
radarIndex: 2,
textStyle:{
color:'#fff'
value : {{ c3 }},
name : '05-06赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '06-07赛季',
type: 'radar',
radarIndex: 3,
textStyle:{
color:'#fff'
value : {{ c4 }},
name : '06-07赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '07-08赛季',
type: 'radar',
radarIndex: 4,
textStyle:{
color:'#fff'
value : {{ c5 }},
name : '07-08赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '08-09赛季',
type: 'radar',
radarIndex: 5,
textStyle:{
color:'#fff'
value : {{ c6 }},
name : '08-09赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '09-10赛季',
type: 'radar',
radarIndex: 6,
textStyle:{
color:'#fff'
value : {{ c7 }},
name : '09-10赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '10-11赛季',
type: 'radar',
radarIndex: 7,
textStyle:{
color:'#fff'
value : {{ c8 }},
name : '10-11赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '11-12赛季',
type: 'radar',
radarIndex: 8,
textStyle:{
color:'#fff'
value : {{ c9 }},
name : '11-12赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '12-13赛季',
type: 'radar',
radarIndex: 9,
textStyle:{
color:'#fff'
value : {{ c10 }},
name : '12-13赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '13-14赛季',
type: 'radar',
radarIndex: 10,
textStyle:{
color:'#fff'
value : {{ c11 }},
name : '13-14赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '14-15赛季',
type: 'radar',
radarIndex: 11,
textStyle:{
color:'#fff'
value : {{ c12 }},
name : '14-15赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
name: '15-16赛季',
type: 'radar',
radarIndex: 12,
textStyle:{
color:'#fff'
value : {{ c13 }},
name : '15-16赛季',
show: true,
textStyle:{
color:"#fff",
fontSize:8
areaStyle: {
color: 'rgba(100, 100, 255, 0.5)',
myChart1.setOption(option);
{% endblock %}
显示效果:
马上下班,有空再写。
本文已收录于以下专栏:
相关文章推荐
这是python中使用wordcloud包生成的词云图。下面来介绍一下wordcloud包的基本用法。class wordcloud.WordCloud(font_path=None, w...
In the Internet age, data is the most valuable resource, big data to lead the traditional industries...
爬取的网站为:,本文爬取的是NBA赛季常规赛至日的数据
改变url_header和url_tail即可爬取特定的其他数据。
源代码如下:
WindowS下安装Python EDP_free 以及pandas
http://blog.csdn.net/huanbia/article/details/
软件/文件名称
epd_free-7.3-2...
EPD(Enthought Python Distribution),现在已经归为Enthought Canopy的一部分了,大家可以直接下载Enthought Canopy,Enthought Ca...
自身为初学小白,在学习《利用Python进行数据分析》时,第一章需要做些准备工作,就是安装python。自己操作过程中,出现了一些问题,例如不知道在哪里下载epd、pip、pandas,安装时不知道如...
他的最新文章
讲师:宋宝华
讲师:何宇健
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)

我要回帖

更多关于 python爬取拉勾网数据 的文章

 

随机推荐