2020-01-09から1日間の記事一覧

Pandasで成人喫煙率(JT全国喫煙者率調査)の表からグラフ作成

www.health-net.or.jp スクレイピング・前処理 import pandas as pd # 表を取得 dfs = pd.read_html("http://www.health-net.or.jp/tobacco/product/pd090000.html", header=0) df = dfs[0] # 列名確認 df.columns # 列名置換 df.rename(columns={'Unnamed: …