Created
July 11, 2015 12:24
-
-
Save Shinichi-Nakagawa/dfd3dcbe3cad3c53ac11 to your computer and use it in GitHub Desktop.
hideki_matsui.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IPython notebookに貼り付けて実行 | |
%matplotlib inline | |
import csv | |
import pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
from retrosheet_util import RetroSheetUtil | |
from analyze_batter import AnalyzeBatter | |
# 2004年および2011年の松井秀喜成績データを読み込む | |
df2004 = pd.read_csv('./data/hideki_matsui_2004.csv') | |
df2011 = pd.read_csv('./data/hideki_matsui_2011.csv') | |
# 分析用のUtilクラス(引数:RETROSHEETを取り扱う用のUtilクラス) | |
analyzer = AnalyzeBatter(RetroSheetUtil) | |
# 内野・外野に飛んだ打球をヒットの種類ごとに数え上げ | |
hit_charts2004 = analyzer.hit_charts(df2004) | |
hit_charts2011 = analyzer.hit_charts(df2011) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment