{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# Any results you write to the current directory are saved as output.","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Data Section 1 - The Basics"},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"MTeams = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MTeams.csv')\nprint('Shape of MTeams = ', MTeams.shape)\nMTeams.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#We might have to remove the teams where LastD1Season is not 2020.\nMTeams.LastD1Season.value_counts()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MSeasons = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MSeasons.csv')\nprint('Shape of MSeasons = ', MSeasons.shape)\nMSeasons.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MNCAATourneySeeds = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MNCAATourneySeeds.csv')\nprint('Shape of MNCAATourneySeeds = ', MNCAATourneySeeds.shape)\nMNCAATourneySeeds.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#W11ab, W16ab and X11ab, X16ab to play together in 2019 and give 4 out of 8 teams to make a total of 64 teams in 2019. \n#Similarly for other seasons, if any.\nMNCAATourneySeeds[MNCAATourneySeeds.Season == 2019].shape","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"#From Day 1 to Day 132. Regular games for selection into main games\nMRegularSeasonCompactResults = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MRegularSeasonCompactResults.csv')\nprint('Shape of MRegularSeasonCompactResults = ', MRegularSeasonCompactResults.shape)\nMRegularSeasonCompactResults.head()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MRegularSeasonCompactResults.WLoc.value_counts()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MNCAATourneyCompactResults = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MNCAATourneyCompactResults.csv')\nprint('Shape of MNCAATourneyCompactResults = ', MNCAATourneyCompactResults.shape)\nMNCAATourneyCompactResults[MNCAATourneyCompactResults.Season == 2019].head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(MNCAATourneyCompactResults[(MNCAATourneyCompactResults.Season == 2019) & ((MNCAATourneyCompactResults.DayNum == 134) | (MNCAATourneyCompactResults.DayNum == 135))].shape)\nMNCAATourneyCompactResults[(MNCAATourneyCompactResults.Season == 2019) & ((MNCAATourneyCompactResults.DayNum == 134) | (MNCAATourneyCompactResults.DayNum == 135))].head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(MNCAATourneyCompactResults[(MNCAATourneyCompactResults.Season == 2019) & ((MNCAATourneyCompactResults.DayNum == 136) | (MNCAATourneyCompactResults.DayNum == 137))].shape)\nMNCAATourneyCompactResults[(MNCAATourneyCompactResults.Season == 2019) & ((MNCAATourneyCompactResults.DayNum == 136) | (MNCAATourneyCompactResults.DayNum == 137))].head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Data Section 2 - Team Box Scores"},{"metadata":{"trusted":true},"cell_type":"code","source":"MRegularSeasonDetailedResults = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MRegularSeasonDetailedResults.csv')\nprint('Shape of MRegularSeasonDetailedResults = ', MRegularSeasonDetailedResults.shape)\nMRegularSeasonDetailedResults.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MNCAATourneyDetailedResults = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MNCAATourneyDetailedResults.csv')\nprint('Shape of MNCAATourneyDetailedResults = ', MNCAATourneyDetailedResults.shape)\nMNCAATourneyDetailedResults.head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Data Section 3 - Geography"},{"metadata":{"trusted":true},"cell_type":"code","source":"MGameCities = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MGameCities.csv')\nprint('Shape of MGameCities = ', MGameCities.shape)\nMGameCities.head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Data Section 4 - Public Rankings"},{"metadata":{"trusted":true},"cell_type":"code","source":"MMasseyOrdinals = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MMasseyOrdinals.csv')\nprint('Shape of MMasseyOrdinals = ', MMasseyOrdinals.shape)\nMMasseyOrdinals.head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Data Section 5 - Play-by-play"},{"metadata":{"trusted":true},"cell_type":"code","source":"MEvents2015 = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MEvents2015.csv')\nMEvents2016 = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MEvents2016.csv')\nMEvents2017 = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MEvents2017.csv')\nMEvents2018 = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MEvents2018.csv')\nMEvents2019 = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MEvents2019.csv')\nprint('Shape of MEvents2015 = ', MEvents2015.shape)\nMEvents2015.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MPlayers = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MPlayers.csv')\nprint('Shape of MPlayers = ', MPlayers.shape)\nMPlayers.head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"Data Section 6 - Supplements"},{"metadata":{"trusted":true},"cell_type":"code","source":"MTeamCoaches = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MTeamCoaches.csv')\nprint('Shape of MTeamCoaches = ', MTeamCoaches.shape)\nMTeamCoaches.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"Conferences = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/Conferences.csv')\nprint('Shape of Conferences = ', Conferences.shape)\nConferences.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MTeamConferences = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MTeamConferences.csv')\nprint('Shape of MTeamConferences = ', MTeamConferences.shape)\nMTeamConferences.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MConferenceTourneyGames = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MConferenceTourneyGames.csv')\nprint('Shape of MConferenceTourneyGames = ', MConferenceTourneyGames.shape)\nMConferenceTourneyGames.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MSecondaryTourneyTeams = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MSecondaryTourneyTeams.csv')\nprint('Shape of MSecondaryTourneyTeams = ', MSecondaryTourneyTeams.shape)\nMSecondaryTourneyTeams.head()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MSecondaryTourneyCompactResults = pd.read_csv(\"/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MSecondaryTourneyCompactResults.csv\")\nprint('Shape of MSecondaryTourneyCompactResults = ', MSecondaryTourneyCompactResults.shape)\nMSecondaryTourneyCompactResults.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MTeamSpellings = pd.read_csv(\"/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MTeamSpellings.csv\", engine='python')\nprint(\"Shape of MTeamSpellings = \", MTeamSpellings.shape)\nMTeamSpellings.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MNCAATourneySlots = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MNCAATourneySlots.csv')\nprint('Shape of MNCAATourneySlots = ', MNCAATourneySlots.shape)\nMNCAATourneySlots.head()\n","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"MNCAATourneySeedRoundSlots = pd.read_csv('/kaggle/input/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/MDataFiles_Stage1/MNCAATourneySeedRoundSlots.csv')\nprint('Shape of MNCAATourneySeedRoundSlots = ', MNCAATourneySeedRoundSlots.shape)\nMNCAATourneySeedRoundSlots.head()","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.4","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":4}