Home >Backend Development >Python Tutorial >How to import data from Kaggle without downloading it?
I want to import data from kaggle into my notebook without having to download it (so if I share my .ipynb, You just have to run the code and it will download it from the internet) but I don't know if it is possible and which link to copy. This is the kaggle website:
https://www.kaggle.com/datasets/kukuroo3/body-performance-data/data?select=bodyperformance.csv
data = pd.read_csv('link here')
I tried copying the download button link but it doesn't work and shows: parsererror: Error while marking data. c Error: Line 9 should have 1 field but saw 2
You can go to the dataset page and click New Notebook in the upper right corner
Open any notebook and click "Add Data" in the right menu
Not recommended because everyone who opens ipynb must first upload their own token.
When using colab, first download your kaggke json key and perform the following steps
Create new token
button in the api section, click on it to download your token.
! pip install kaggle
from google.colab import files files.upload()
!kaggle datasets download -d [user/data-name]
In our example, [user/data-name]
is kukuroo3/body-performance-data
The above is the detailed content of How to import data from Kaggle without downloading it?. For more information, please follow other related articles on the PHP Chinese website!