import pandas as pd
file_path = '' # Replace with your file path if youre running on a local ide, if online you upload your file at this point alphasports_data = pd.read_excel(file_path)
alphasports_data.columns = alphasports_data.iloc[1] # Set the second row as the header alphasports_data = alphasports_data.drop([0, 1]) # Drop the first two rows
alphasports_data = alphasports_data.dropna(axis=1, how='all')
alphasports_data['Slot Date'] = alphasports_data['Slot Date'].apply(lambda x: x.strip() if isinstance(x, str) else x) alphasports_data['Slot Date'] = pd.to_datetime(alphasports_data['Slot Date'], errors='coerce')
alphasports_data['Slot Cost'] = pd.to_numeric(alphasports_data['Slot Cost'], errors='coerce')
#analysis of time popularity, logic implementation
slot_time_counts = alphasports_data['Slot time'].value_counts()
sorted_slot_time_counts = slot_time_counts.sort_values(ascending=False)