Power Query vs. Python - Soccer Data Cleaning Challenge ⚽πŸ₯… @chandoo_
Power Query vs. Python - Soccer Data Cleaning Challenge ⚽πŸ₯…  @chandoo_
Uploaded June 2026 | Updated November 2026, 7 hours ago
Master this data cleaning challenge using real World Cup soccer statistics. Learn how to fix messy, multi-line goal entries to a neat table (or data frame).

This tutorial walks you through a practical data cleaning challenge where I address a common issue: multiple goals recorded in a single cell separated by new line characters. This is essential knowledge for anyone looking to clean data efficiently.

I am showing both Python & Power Query approaches for cleaning the data. Which one is your favourite? Comment and let me know.


πŸ“ Try it yourself:
Grab the raw data here and try it yourself -
chandoo.org/wp/wp-content/uploads/2026/06/fifa-worldcup-goals-cleanup.xlsx

πŸ‘©β€πŸ’»πŸ§‘β€πŸ’» Completed code:

See my github repo for the python notebook and PQ workbook.

Python notebook: github.com/chandoo-org/python/blob/ba747ec6c5373c34ee35826d6a1c6822c42bae0f/fifa%20goals%20data%20cleanup.ipynb
Power Query File: chandoo.org/wp/wp-content/uploads/2026/06/fifa-goals-pq.xlsx

πŸ• Video Topics:

0:00 - Introduction to the data cleaning challenge
1:32 - Data Cleaning with Python (loading data to Pandas Dataframe)
2:30 - Splitting and combining all data to one DF
4:15 - Splitting goals by new line and exploding the Data Frame
5:08 - Dealing with multiple goals by same person
8:55 - Removing un-needed columns and tagging each goal by type (penalty, own goal etc.)
10:36 - Possible next steps for this data...
11:13 - Loading data into Power Query
12:00 - Splitting and appending tables in PQ
13:20 - Separating each line to new record
14:25 - Separating scorer and goal time details to two columns
18:33 - Splitting multiple goals by same person to different rows
19:02 - Tagging goals by their type (penalty, own goal etc.)
19:50 - Loading data into Excel
20:13 - Closing & bloops

~

#Powerquery #python #fifa
Power Query vs. Python - Soccer Data Cleaning Challenge ⚽πŸ₯…AI Jargon Confusing you? A No-Nonsense guide to understand top AI termsHow to find Outliers in Your Data Easily with Z-Scores in ExcelCreate your first Power BI APP in 5 minutes!How to install FREE SQL Server on Your Local Computer | Complete WalkthroughThis Excel Trick Makes ChatGPT ObsoleteXLOOKUP MULTI CRITERIA MAGIC #excelCalendar with just ONE EXCEL FORMULA 😲Excel Heatmaps - 3 Ways to Make Them [Must have for Dashboards]3 Excel Tricks That Look IMPRESSIVE But Take 30 SecondsAdvanced Excel Charts for Dashboards - Free Masterclass for Data AnalystsGet the TOP Salaries with this Excel Formula
Chandoo |

Power Query vs. Python - Soccer Data Cleaning Challenge ⚽πŸ₯…

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER