starters["total_cards"] = starters["yellow_cards"] + starters["red_cards"] cards_by_player = starters.groupby(["player_id", "position_name"])["total_cards"].sum().reset_index()
: Teaching data cleaning, merging (e.g., joining appearances.csv with goals.csv ), and reshaping skills in R or Python. jfjelstul worldcup data-csv appearances.csv
: Tracking the average age of players appearing in the finals over decades. joining appearances.csv with goals.csv )
If a player is substituted off , they still have one row in appearances.csv for that match. Substitution flags just indicate how they entered/exited. jfjelstul worldcup data-csv appearances.csv