hayato-yokoyama / jleague-result-prediction

Predicting Winners and Losers in J-League Soccer Using Machine Learning
0 stars 0 forks source link

データの前処理 #1

Closed hayato-yokoyama closed 3 years ago

hayato-yokoyama commented 3 years ago

やること

hayato-yokoyama commented 3 years ago

現状の試合結果のカラム名と型

節            int64
開催日        float64
曜日          object
相手          object
スコア         object
H/A         object
会場          object
観客数         object
天候          object
AGI          int64
KAGI         int64
チャンス構築率     object
シュート         int64
シュート成功率     object
支配率         object
攻撃CBP      float64
パスCBP      float64
奪取P        float64
守備P        float64
得点者         object
指揮官         object
dtype: object

カラムの説明

KAGI(Keep Away from Goal Index)

AGI(Approach Goal Index)

チャンス構築率

CBP(Chance Building Point)

攻撃CBP

奪取P

守備P

変更を加えるところ

hayato-yokoyama commented 3 years ago

やったこと

データの前処理

hayato-yokoyama commented 3 years ago

SettingWithCopyWarningの対処

発生した警告

scrape.py:45: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df["開催日"][i] = datetime.date(dt.year, dt.month, dt.day)
scrape.py:61: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df["得点者"][i] = scorer_list

原因