act as a datascientist trainer, generate a messy dataset with about 1000 entries that students could use to practice the data cleaning methods. this dataset must deal with olympic games and must contain date, text, categorical data, numerical data
Assistant
Messy Olympic Games Dataset:
This dataset contains information about Olympic Games from 1896 to 2020, but it's been gathered from various sources and has some inconsistencies and missing values.
File: messy_olympics.csv
Columns:
Year: Year of the Olympic Games (integer)
Season: Summer or Winter (text)
City: City where the Olympics were held (text)
Country: Country hosting the Olympics (text)
Sport: Sport (text)
Event: Specific event within the sport (text)
Athlete: Athlete's name (text)
NOC: National Olympic Committee (text)
Medal: Gold, Silver, Bronze, or NaN (text)
Age: Athlete's age at the time of the competition (integer)
Height: Athlete's height in centimeters (integer)
Weight: Athlete's weight in kilograms (integer)
Games: "Summer" or "Winter" for the Games (text, sometimes inconsistent)
Sex: Athlete's sex (text, sometimes misspelled)
Team: Athlete's team (text, sometimes contains extra information)
Data Cleaning Tasks:
Missing values: Fill in missing values for age, height, and weight using appropriate methods (e.g., mean, median, imputation).
Inconsistent data: Standardize "Games" column to be either "Summer" or "Winter".
Text cleaning: Clean up athlete names, team names, and event names to remove extra spaces, punctuation, and inconsistencies in capitalization.
Categorical data: Convert the "Medal" column into a numerical representation (e.g., 1 for Gold, 2 for Silver, 3 for Bronze).
Data types: Ensure all columns have the correct data types (e.g., "Year" should be integer, "Age" should be float).
Outliers: Identify and handle outliers in age, height, and weight columns.
Note: This is just a small sample of the dataset. The full dataset will contain around 1000 entries with different Olympic Games, sports, events, and athletes. The inconsistencies and missing values will be randomly distributed throughout the dataset to provide a challenging but realistic data cleaning experience for students.