我有一个称为match的数据帧,其中包含以下列:
id,season,city,date,team 1,team 2,toss_winner,toss_decision,result,DL_applied winner,win_by_runs,win_by_wickets,player_of_match,venue,umpire 1,umpire 2, umpire 3
。
由此,我需要创建一个新的数据帧,称为matches_compact,其中应包含以下列:
id, season, date and winner
答案 0 :(得分:1)
matches_compact=matches[['id','season','date','winner']]