from google.colab import drive drive.mount('/content/drive') !pip install kaggle from google.colab import files uploaded = files.upload() for fn in uploaded.keys(): print('User uploaded file "{name}" with length {length} bytes'.format( name=fn, length=len(uploaded[fn]))) # Then move kaggle.json into the folder where the API expects to find it. !mkdir -p ~/.kaggle/ && mv kaggle.json ~/.kaggle/ && chmod 600 ~/.kaggle/kaggle.json mypath = '/content/drive/My Drive/Colab Notebooks/kaggle/' !kaggle competitions list -s sports !kaggle competitions list -s finance !kaggle competitions list -s movies !kaggle competitions list --category research !kaggle competitions files march-madness-analytics-2020 !kaggle competitions leaderboard ubiquant-market-prediction -s !kaggle datasets list -s soccer !kaggle datasets list !kaggle datasets list --sort-by votes !kaggle datasets files hugomathien/soccer !kaggle datasets files hikne707/big-five-european-soccer-leagues !kaggle datasets download hikne707/big-five-european-soccer-leagues !unzip big-five-european-soccer-leagues.zip import os import pandas as pd df = pd.read_csv('BIG FIVE 1995-2019.csv') df.shape df.info() df !kaggle datasets files gravix/european-soccer !kaggle datasets download gravix/european-soccer !unzip european-soccer.zip df = pd.read_csv('european_soccer.csv') df df.info() df.shape df.columns import numpy as np # linear algebra import os # accessing directory structure import pandas as pd nRowsRead = 1000 # specify 'None' if want to read whole file # european_soccer.csv may have more rows in reality, but we are only loading/previewing the first 1000 rows df1 = pd.read_csv('european_soccer.csv', delimiter=',', nrows = nRowsRead) df1.dataframeName = 'european_soccer.csv' nRow, nCol = df1.shape print(f'There are {nRow} rows and {nCol} columns') df1