JFL

JFLランキング作成

JFL

imabari.hateblo.jp 新たに作成 crosstabに変更 lambdaに変更 import pandas as pd import numpy as np # 行数 pd.set_option("display.max_columns", None) # データ取得 # 試合結果を取得 url = "http://www.jfl.or.jp/jfl-pc/view/s.php?a=1411&f=2019A00…

JFLゴール数ランキング(GoogleDrive)

imabari.hateblo.jp import csv import time from urllib.parse import urljoin import gspread import pandas as pd import requests from bs4 import BeautifulSoup from oauth2client.service_account import ServiceAccountCredentials from tqdm import…

JFLランキング作成(GoogleDrive)

pip3 install pandas pip3 install beautifulsoup4 pip3 install html5lib pip3 install lxml pip3 install gspread pip3 install oauth2clinet pip3 install tqdm # -*- coding: utf-8 -*- import gspread import pandas as pd import requests from bs4 im…

pandasでJFLの戦績表を作成する

JFL

pip install lxml pip install html5lib import pandas as pd dfs = pd.read_html( 'http://www.jfl.or.jp/jfl-pc/view/s.php?a=1411&f=2019A001_spc.html', skiprows=1, na_values='-') jfl_2019 = [ 'Honda FC', 'FC大阪', 'ソニー仙台FC', 'F…

JFLの試合結果から得点ランキング作成

JFL

#%% import csv from urllib.parse import urljoin import time import requests from bs4 import BeautifulSoup def cleaning(info, team, data): result = [] for trs in data: temp = [i.get_text(strip=True) for i in trs.select('th, td')] # 時間の分…

FC今治のゴール集計・先取点

!pip install lxml !apt install fonts-ipafont-gothic !rm /content/.cache/matplotlib/fontList.json """再起動""" import time import csv import requests from bs4 import BeautifulSoup # 試合数 n = 10 + 1 with open('fcimabari_goal.tsv', 'w') as …

JFLの試合結果からランキングを作成

import pandas as pd url = 'http://www.jfl.or.jp/jfl-pc/view/s.php?a=1411&f=2019A001_spc.html' dfs = pd.read_html(url, skiprows=1, na_values='-') len(dfs) df = pd.concat( dfs, keys=[i for i in range(1, len(dfs) + 1)], names=['節', '番号']) …

FC今治の順位をスクレイピング

import datetime import requests from bs4 import BeautifulSoup url = 'http://www.jfl.or.jp/jfl-pc/view/s.php?a=1277' r = requests.get(url) if r.status_code == requests.codes.ok: soup = BeautifulSoup(r.content, 'html.parser') update_str = so…